Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.0
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