<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Stephen,<br>
<br>
Actually, your question is half ADQL, half TAP.<br>
<br>
Speaking about ADQL, booleans are not yet supported. It means that
you can not write constraints like `a_column = TRUE`. Booleans
exists only as integer values 1 or 0. The best known example is the
positional cross-match syntax `1=CONTAINS(POINT(...),
CIRCLE(...))`. However, there is a plan to support properly booleans
in ADQL in a future version.<br>
<br>
In the TAP context, nothing really prevents a TAP service to return
boolean values. The datatype applied in such case is undefined in
TAP-1.0. However, in TAP-1.1, datatypes are now explicitly expressed
as VOTable datatypes. The latter provides an explicit `boolean`
datatype. So, if your service fully support TAP-1.1, you should
already have the possibility to return boolean values using this
VOTable datatype.<br>
<br>
Now, as the developer of VOLLT, I'd like to add a comment about the
`validated types` you extracted. VOLLT/TAP-Lib does not yet support
TAP-1.1. But, I am working on it currently ; it is just a matter of
time ; sorry for the long waiting. So, it is true that currently
there is no explicit BOOLEAN values. However, boolean extracted from
the database should be converted automatically by VOLLT into
SMALLINT with only two possible values: 1 and 0. To make this work,
in the TAP_SCHEMA, any boolean column should be defined as SMALLINT
(instead of BOOLEAN). That was the default strategy in VOLLT for
TAP-1.0. Once I will have changed the datatype system of VOLLT
(which requires a lot of time and precautions as it is a core part
of my libraries...but it is almost done), the `boolean` datatype of
VOTable will be used automatically by default. At that moment, the
class you are pointing to as "the list of validated types" will be
deprecated and a lot more flexibility will be possible regarding the
datatypes by using the VOTable datatypes. Again, sorry for this long
waiting.<br>
<br>
I hope I answered your questions. Of course, anybody else is free to
comment or complete these answers. If you have other questions or
concerns, please, do not hesitate to share them.<br>
<br>
Cheers,<br>
Grégory M.<br>
<br>
<br>
<div class="moz-cite-prefix">On 07/11/2024 11:35, Stephen Lloyd via
dal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:LO2P265MB4584DC296EF0BED7386A57D8D75C2@LO2P265MB4584.GBRP265.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Aptos;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">TLDR: Are
Booleans acceptable data types in TAP and if not, should
they be converted to another data type?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m
wondering if anyone can assist with either pointing me to
the correct documentation containing a definitive list of
supported data types for TAP please?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I’m
currently looking at the Vollt libraries and there seems to
be
<a
href="https://github.com/gmantele/vollt/blob/master/src/adql/db/DBType.java"
moz-do-not-send="true">a list of validated types</a>
</span><i><span style="font-size:10.0pt">SMALLINT</span></i><span
style="font-size:10.0pt">,
<i>INTEGER</i>, <i>BIGINT</i>, <i>REAL</i>, <i>DOUBLE</i>,
<i>BINARY</i>, <i>VARBINARY</i>,
<i>CHAR</i>, <i>VARCHAR</i>, <i>BLOB</i>, <i>CLOB</i>, <i>TIMESTAMP</i>,
<i>POINT</i>,
<i>CIRCLE</i>, <i>POLYGON</i>, <i>REGION</i>, <i>UNKNOWN</i>,
UK<i>NOWN_NUMERIC</i> but no BOOLEAN.
</span><span style="font-size:11.0pt">I have existing database
tables/columns that have BOOLEAN data types but they get
converted to UNKNOWN at runtime due to the validation in
Vollt.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Should TAP
support BOOLEAN or should it be converted to say SMALLINT
(as a 0/1)?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Stephen
Lloyd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">Research
Software Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">University of
Manchester<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">UKSRC<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</blockquote>
<br>
</body>
</html>