Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ void ADQL_parser::init_non_predicate_geometry_function() {
geo_one_arg_names %= ascii::no_case[ascii::string("COORD1")] |
ascii::no_case[ascii::string("COORD2")];

geo_two_arg_names %= ascii::no_case[ascii::string("DISTANCE")];
geo_two_arg_names %= ascii::no_case[ascii::string("DISTANCE")] |
ascii::no_case[ascii::string("POSITION_ANGLE")];

non_predicate_geometry_function_one_arg %=
(hold[lexeme[geo_one_arg_names >> &nonidentifier_character]] > '(' >
Expand Down
18 changes: 17 additions & 1 deletion test/parse_adql.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ int main(int argc, char *argv[]) {
"IN a.uri) > 0",

// IRSA-7681 flexible WHERE revisited

"WITH SIA2_MINIMAL_JOIN AS (SELECT o.obsid as obsid, p.planeid as planeid, "
"CAST ('1' AS BIGINT) as upload_row_id FROM (caom.observation o JOIN "
"caom.plane p ON o.obsid = p.obsid) WHERE ((o.collection = "
Expand Down Expand Up @@ -902,6 +901,23 @@ int main(int argc, char *argv[]) {
"= o.telescope_name) AND (SIA2_CLOSEST_SUBQUERY.instrument IS NULL OR "
"SIA2_CLOSEST_SUBQUERY.instrument = o.instrument_name)",

// IRSA-7854: support position_angle
"SELECT TAP_UPLOAD.pos.cntr as in_row_id, "
"POSITION_ANGLE(POINT('ICRS', dbtable.ra, dbtable.dec), POINT('ICRS', "
"mytable.ra, mytable.dec)) as unwise_posang "
"FROM wise.wise_allwise_p3am_cdd dbtable, "
"TAP_UPLOAD.pos WHERE "
"(ST_Intersects(TAP_UPLOAD.pos.poly,dbtable.poly)) ",

"SELECT TAP_UPLOAD.pos.cntr as in_row_id, "
"DISTANCE(POINT('ICRS', dbtable.ra, dbtable.dec), POINT('ICRS', "
"mytable.ra, mytable.dec)) as unwise_dist, "
"POSITION_ANGLE(POINT('ICRS', dbtable.ra, dbtable.dec), POINT('ICRS', "
"mytable.ra, mytable.dec)) as unwise_posang "
"FROM wise.wise_allwise_p3am_cdd dbtable, "
"TAP_UPLOAD.pos WHERE "
"(ST_Intersects(TAP_UPLOAD.pos.poly,dbtable.poly)) ",

#endif // RUN_ALL
};

Expand Down