ADQL XMATCH

Walter Landry wlandry at caltech.edu
Tue Feb 9 23:11:54 CET 2016


"Tom McGlynn (NASA/GSFC Code 660.1)" <tom.mcglynn at nasa.gov> wrote:
> However if the xmatch function is doing what I indicated above, I
> think the whole function is superfluous.
> 
> Rather than
>     (xmatch(ra1,dec1,ra2,dec2,rad) = 1)
> or if we use a logical value
>    (xmatch(ra1,dec1,ra2,dec2,rad))
> 
> it seems far more natural to use
>     (distance(ra1,dec1,ra2,dec2) < rad)

I do like this since it has a certain economy and does not introduce a
new keyword.  I still like types, so I would write it using the point
literals as

  distance(db_table.pos,{ra,dec}) < radius

I must note that implementing the more sophisticated example would
require spatial support directly in the database.  So it would not
work for our backends.

Cheers,
Walter Landry


More information about the dal mailing list