Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boolean_term(s) in SELECT clause #8

Open
Zarquan opened this issue Feb 26, 2018 · 1 comment
Open

boolean_term(s) in SELECT clause #8

Zarquan opened this issue Feb 26, 2018 · 1 comment

Comments

@Zarquan
Copy link
Member

Zarquan commented Feb 26, 2018

Email from Marco [email protected] and Sonia [email protected]
2018-01-25

Working on TAP and ADQL in Trieste we (actually Sonia) found the following discrepancy/issue
ADQL seems to support a query like

SELECT "size"/2 AS half_size FROM TAP_SCHEMA.columns

while it seems not to support

SELECT "size" = 1 AS is_size_1 FROM TAP_SCHEMA.columns

At least Gregory's library (and TOPCAT, but IIRC TOPCAT uses Gregory's ADQL lib for validation) does so and it seems correct with respect to ADQL-2.0.

However in ADQL-2.1 the SELECT clause allows a <value_expression> that can be also a <boolean_value_expression>. This latter, however, contains no <boolean_term> and so disallows the above second query. That boolean_term would allow the SELECT to contain expressions like the above, exactly like it is in a WHERE clause (see <search_condition> definition).

We are wondering whether this is the intended behaviour or if it fits into the BNF-issues' list.
There's also the <boolean_function> BNF term (pg.56 in ADQL-2.1) that is blank, to complicate the view.

I'd like your opinion however, just to know if we can imagine to use boolean valued virtual columns (e.g.
like an a = value AS vcol) in the future or not (we already have possible alternatives).

@Zarquan
Copy link
Member Author

Zarquan commented Feb 26, 2018

You are right, <boolean_value_expression> probably should contain <boolean_term>.

I'll try to get this added to the specification when we edit it next.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant