Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2335

Error message must be updated to exclude unsupported operators when queries fail to parse

    XMLWordPrintableJSON

Details

    Description

      When queries fail to parse due to errors in query syntax, an error is thrown with a list of expected operators, which include some which we do not support at present.

      I understand that the SQL validation errors come from the Calcite layer. But since we do not support all operators for now (for example: INTERSECT), the message must be updated if possible, to correctly reflect what is supported.

      This would make sure contradicting messages aren't thrown (for example: first complaining with parse error indicating INTERSECT is a valid operator and then upon correction, failing saying INTERSECT isn't supported).

      Query failed: ParseException: Encountered ";" at line 1, column 89.
      Was expecting one of:
          <EOF> 
          "ORDER" ...
          "LIMIT" ...
          "OFFSET" ...
          "FETCH" ...
          "UNION" ...
          "INTERSECT" ...
          "EXCEPT" ...
          "NOT" ...
          "IN" ...
          "BETWEEN" ...
          "LIKE" ...
          "SIMILAR" ...
          "=" ...
          ">" ...
          "<" ...
          "<=" ...
          ">=" ...
          "<>" ...
          "+" ...
          "-" ...
          "*" ...
          "/" ...
          "||" ...
          "AND" ...
          "OR" ...
          "IS" ...
          "MEMBER" ...
          "SUBMULTISET" ...
          "MULTISET" ...
          "[" ...
          "OVERLAPS" ...
          "YEAR" ...
          "MONTH" ...
          "DAY" ...
          "HOUR" ...
          "MINUTE" ...
          "SECOND" ...
      Error: exception while executing query: Failure while executing query. (state=,code=0)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            agirish Abhishek Girish
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: