ADQL XMATCH

Mark Taylor M.B.Taylor at bristol.ac.uk
Sat Apr 9 00:39:27 CEST 2016


On Thu, 7 Apr 2016, Markus Demleitner wrote:

> Hi Walter,
> 
> On Wed, Apr 06, 2016 at 11:14:17AM -0700, Walter Landry wrote:
> > Marco Molinaro <molinaro at oats.inaf.it> wrote:
> > 
> > Since no one commented on it before, I would like to repeat my
> > proposal for a point literal.
> > 
> >   {a,b} -> POINT('ICRS GEOCENTER',a,b)
> > 
> > Then the distance function would be
> > 
> >   DISTANCE({ra1,dec1},{ra2,dec2})
> > 
> > This would keep the function type safe and obviate the need for a new
> > overload for DISTANCE.
> 
> I suppose everyone was more or less like me: Nice, but is it really
> worth introducing new syntax?  And will this be trouble later, when
> we (perhaps) may deal with array literals?  Not sure.  Ah, let
> someone else worry about it.
> 
> So, I can't give you more than a heartfelt "undecided".
> 
> 
> DISTANCE with four floating-point arguments, on the other hand, sits
> nicely in my comfort zone of probably making the average astronomer
> happy while being very cheap -- after all, we have other functions

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.

> that admit a variable number of arguments and change behaviour
> depending on the arity used. I'll just mention random here.

Overloading functions with different numbers of arguments looks like
it's rapidly being acknowledged as a non-issue, but if it was a
problem we could always call it SKYDISTANCE instead.  I'm tempted
to suggest that this would be a clearer name here in any case.

Mark

[*] admittedly I'm not an SQL/DB expert - it's arguable whether that
    makes me better or worse qualified to comment here on syntax we're
    going to inflict on astronomers

--
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-9288776  http://www.star.bris.ac.uk/~mbt/


More information about the dal mailing list