You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coord_value being used only by DISTANCE, COORD1 and COORD2, this modification would be totally harmless. Of course, any other suggestion of modification allowing the usage of CENTROID in DISTANCE is welcome.
To clarify: my issue is that, while the query (1) below works well,
Query 1:
SELECT count(*) from ivoa.ObsCore where DISTANCE(point('',s_ra,s_dec), s_region) > 0.1
(successful)
the query (2) does not:
Query 2:
SELECT count(*) from ivoa.ObsCore where DISTANCE(point('',s_ra,s_dec), centroid(s_region)) > 0.1
error:
Incorrect ADQL query: Encountered "DISTANCE". Was expecting one of: "(" "NOT" "(" "(" "(" "(" "("
(HINT: "DISTANCE" is a reserved ADQL word. To use it as a column/table/schema name/alias, write it between double quotes.)
The error is due to the fact that DISTANCE does not suppot the CENTROID.
According to the following rules (v2.1), a
DISTANCE
function can accept onlyPOINT
functions and column references:So, it makes impossible to write the following ADQL query:
Since
CENTROID
returns aPOINT
, the above query should be correct.This issue is a request to change the BNF so that a
coord_value
includes theCENTROID
function:coord_value
being used only byDISTANCE
,COORD1
andCOORD2
, this modification would be totally harmless. Of course, any other suggestion of modification allowing the usage ofCENTROID
inDISTANCE
is welcome.--
This issue has been originally raised by @almicol and @vforchi on another GitHub issue in the gmantele/taplib repository.
The text was updated successfully, but these errors were encountered: