TAPNotes & Mistake in ADQL grammar ?
Markus Demleitner
msdemlei at ari.uni-heidelberg.de
Thu Oct 2 07:53:02 CEST 2014
Dear DAL,
On Wed, Oct 01, 2014 at 06:47:25PM +0200, Grégory Mantelet wrote:
> 1/ In section 2.2.5 of TAPNotes, the given grammar contains an
> item called "<query primary>" which is referenced nowhere in the
> given new rules and in the current ADQL grammar. I would say it is a
> copy-paste error, because the content of this rule is exactly the
> same as the new "<query_expression>". So, let's say it is a very
As <query primary> is not referenced anywhere, it is indeed
superfluous in this grammar. Going back to sql1992, I notice I
really messed up the rule above, fortunately in a way so gross it'd
have been obvious in implementation right away:
<non_join_query_term> ::=
[...] <query term> INTERSECT [ ALL ]
is of course missing its second operand. In sql1992, this second
operand is the <query_primary>. As Grégeory correctly observes, in
ADQL <query_primary> and <query_expression> have the same expansions.
So, I'm fixing the above rule to
[...] <query term> INTERSECT [ ALL ] <query_expression>
in SVN.
> 2/ However, while looking a such rule in the current grammar
> (ADQL 2.0 standard document), I discovered that it was valid,
> according to the given BNF, to have a query limited to a table name
> or a table join. Indeed, it is possible due to the following rules:
>
> <query_expression> ::= <query_specification>
> | <joined_table>
>
> So, a query can be either a "SELECT .... FROM ..." or just a table
> name (or a join between 2 tables), according to the following rules:
Here, I disagree with Grégory -- unless I'm completely confused here,
the root production of ADQL is query_specification, not
query_expression, no?
Cheers,
Markus
More information about the dal
mailing list