IRSA-7681: libadql: improve support of flexible WHERE-clause syntax#28
IRSA-7681: libadql: improve support of flexible WHERE-clause syntax#28judith-ipac merged 1 commit intomasterfrom
Conversation
sreenivasapydi
left a comment
There was a problem hiding this comment.
Continuing with the review, marked some as viewed.
|
|
||
| "SELECT dataproduct_type,obs_id,obs_collection FROM ivoa.obscore WHERE " | ||
| "CONTAINS(POINT(148.8882208, 69.06529472), s_region)=1 ORDER BY " | ||
| "dataproduct_type,obs_id,obs_collection", |
There was a problem hiding this comment.
In the previous version, parser_adql.cxx out said:
PASS: SELECT dataproduct_type,obs_id,obs_collection FROM ivoa.obscore WHERE y> 3 AND CONTAINS(POINT(148.8882208, 69.06529472), s_region)=1 AND x<1 ORDER BY dataproduct_type,obs_id,obs_collection
SELECT dataproduct_type, obs_id, obs_collection FROM ivoa.obscore WHERE CONTAINS(POINT('ICRS GEOCENTER',148.8882208,69.065294719999997),s_region)=1 AND y > 3 AND x < 1
It missed the "ORDER BY dataproduct_type,obs_id,obs_collection". This new version includes it and look to be ore correct. Just mentioning the differences in the log output
sreenivasapydi
left a comment
There was a problem hiding this comment.
Scanned the sources lightly, focussed more on the unit tests and the rest results. compared the parse_adql output with the previous version. Looks good to me.
Retired problematic std::regex used to rewrite WHERE-clauses in the form required by ADQL_parser. In its place: Added Query_Preprocessor::preprocess() to oversee a more transparent approach to preprocessing. Added Top_Level_Parser to split each incoming query into (up to) 3 parts: an optional WITH clause at the beginning, optional trailing clauses (HAVING, ORDER BY, GROUP BY) at the end, and a list of SELECT_FROM_WHERE clauses in the middle joined by some flavor of UNION. Added Where_Clause_Normalizer to modify the WHERE clauses of the middle section as needed. Modified Query::Query to send the (up to) 3 (possibly modified) parts to ADQL_parser through the appropriate lower-level entry points for parsing.
ed75bb1 to
c8e557c
Compare
Retired problematic std::regex used to rewrite WHERE-clauses in the form required by ADQL_parser. In its place:
Added Query_Preprocessor::preprocess() to oversee a more transparent approach to preprocessing.
Added Top_Level_Parser to split each incoming query into (up to) 3 parts: an optional WITH clause at the beginning, optional trailing clauses (HAVING, ORDER BY, GROUP BY) at the end, and a list of SELECT_FROM_WHERE clauses in the middle joined by some flavor of UNION.
Added Where_Clause_Normalizer to modify the WHERE clauses of the middle section as needed.
Modified Query::Query to send the (up to) 3 (possibly modified) parts to ADQL_parser through the appropriate lower-level entry points for parsing.