[ https://issues.apache.org/jira/browse/DRILL-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Hsuan-Yi Chu resolved DRILL-3326. -------------------------------------- Resolution: Fixed > Query with unsupported windows function containing "AS" blocks correct error > message > ------------------------------------------------------------------------------------ > > Key: DRILL-3326 > URL: https://issues.apache.org/jira/browse/DRILL-3326 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.1.0 > Reporter: Krystal > Assignee: Sean Hsuan-Yi Chu > Labels: window_function > Fix For: 1.1.0 > > > 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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)