Author: Grégory Mantelet
Date last changed: 2020-05-13
Date accepted: 2020-06-11
It appears that the grammar of ADQL-2.0 is more permissive than intended for the first argument of the POINT
, BOX
, CIRCLE
and POLYGON
functions. This alert has been raised while adapting the grammar of the functions above for an alternative function signature introduced in ADQL-2.1 (see the GitHub Issue #29). This argument represents the coordinate system of the geometry coordinates. The grammar of ADQL-2.0 admits any string expression ( <string_value_expression>
) here, which includes string concatenation, column references, User Defined Functions (UDFs), any other function returning a string, but also numerics. Considering that a coordinate system cannot be represented by a numeric expression, this case should have already been excluded. In particular, allowing a non-constant expression as coordinate system makes its interpretation very difficult by an ADQL-SQL translation engine (indeed, parsing and transform functions are required on the database side). Also, users have no explicit way to know what kind of coordinate transformation is applied.
This Erratum restricts the coordinate system argument of POINT
, BOX
, CIRCLE
and POLYGON
to a string literal ( <character_string_literal>
) to mitigate these problems.
This Erratum changes the BNF grammar of ADQL-2.0, in the Appendix A, p.25, from:
<coord_sys> ::= <string_value_expression>
into:
<coord_sys> ::= <character_string_literal>
The description of the first argument of the functions is also changed for:
BOX
, section 2.4.3 (p.13),
CIRCLE
, section 2.4.5 (p.14),
POINT
, section 2.4.12 (p.18), and
POLYGON
, section 2.4.13 (p.18),
the coordinate system is a string value expression as defined in Section 2.4.1.
into:
the coordinate system is a string literal as defined in Section 2.4.1.
Currently, very few ADQL services are able to interpret the coordinate system argument and to perform appropriate coordinate transformations. Currently, as far as we know, such services are able to do so only if the coordinate system is given as a string literal. This Erratum will not impact them.
For ADQL services that can interpret coordinate systems and apply coordinates transformations system from column references (e.g., via an uploaded table) – no such service is known at the present time –, it is perfectly allowed to offer more features in an implementation as long as the required ADQL language is supported.
From ADQL-2.1 on, the coordinate system argument is deprecated and becomes optional. Hence, no impact expected in future versions of ADQL where this argument will likely be removed.