Skip to content
  • gmantele's avatar
    [ADQL] Fix a Big Bug reported by M.Taylor and M.Demleitner: in ORDER BY, GROUP... · 13a2dc54
    gmantele authored
    [ADQL] Fix a Big Bug reported by M.Taylor and M.Demleitner: in ORDER BY, GROUP BY and USING only regular and delimited identifiers are accepted, not qualified column names.
    For instance: "SELECT table.column_name FROM table ORDER BY table.column_name" is wrong. We should instead write:
    "SELECT table.column_name FROM table ORDER BY column_name".
    "SELECT table.column_name AS mycol FROM table ORDER BY mycol" is also correct.
    Of course, for ORDER BY and GROUP BY, it is still possible to reference a column using its index in the SELECT clause.
    For instance: "SELECT table.column_name FROM table ORDER BY 1".
    13a2dc54