ADQL XMATCH

Walter Landry wlandry at caltech.edu
Tue Apr 12 21:05:35 CEST 2016


Mark Taylor <M.B.Taylor at bristol.ac.uk> wrote:
> I'm with Markus here.  I can see that Walter's {} syntax is in some
> sense cleaner, but to me[*] it looks less SQLy, so by the principle
> of least surprise for astronomer users (who, if they're like me, will
> probably forget every time whether it's curly or square or round
> brackets required in this case) I would favour simply having 4
> numeric arguments.

The advantage of POINT literals is that they can be used consistently
throughout the grammar.  For DISTANCE, we can special case it so that
there is not much difference.  But then there is no principled reason
against special cases for CONTAINS, INTERSECTS, CIRCLE, etc.  Except
that the argument lists become a mile long, making their use
error-prone.

Also, ADQL is an astronomy-centric language.  Adding syntactic sugar
for astronomers that does not conflict with SQL [1] is all good.

Cheers,
Walter Landry


[1] ODBC does use curly braces for some literals

    http://stackoverflow.com/questions/7428538/curly-braces-in-t-sql

    but those are distinguishable because they have an identifier
    and then a quoted string.  My syntax requires a comma.


More information about the dal mailing list