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

Query with unsupported windows function containing "AS" blocks correct error message

    XMLWordPrintableJSON

Details

    Description

      The following query contains "AS" using un-supported function first_value gives incorrect error:

      select FIRST_VALUE(voter_id) OVER (PARTITION BY age ORDER BY contributions ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING) as t from voter_hive;
      Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: Failure while materializing expression.
      Error in expression at index 1. Error: Missing function implementation: [first_value(INT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION-.

      After I remove the "AS" keyword, the correct error message is displayed:
      select FIRST_VALUE(voter_id) OVER (PARTITION BY age ORDER BY contributions ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING) from voter_hive;
      Error: UNSUPPORTED_OPERATION ERROR: The window function FIRST_VALUE is not supported
      See Apache Drill JIRA: DRILL-3195

      Attachments

        Activity

          People

            seanhychu Sean Hsuan-Yi Chu
            knguyen Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: