Khurram Faraaz created DRILL-4429: ------------------------------------- Summary: Need a better error message when window frame exclusion is used in frame-clause Key: DRILL-4429 URL: https://issues.apache.org/jira/browse/DRILL-4429 Project: Apache Drill Issue Type: Bug Components: SQL Parser Affects Versions: 1.6.0 Reporter: Khurram Faraaz Priority: Minor
We need to report a proper error message to user when window frame exclusion is used in the window frame-clause. Currently we do not support it and the current error message is not helpful. Drill 1.6.0 commit ID: 6d5f4983 {noformat} 0: jdbc:drill:schema=dfs.tmp> select count(*) OVER(PARTITION BY CAST(columns[0] as integer) ORDER BY cast(columns[0] as integer) RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED following EXCLUDE CURRENT ROW) from dfs.tmp.`t_alltype.csv`; Error: PARSE ERROR: Encountered "EXCLUDE" at line 1, column 158. Was expecting one of: ")" ... "ALLOW" ... "DISALLOW" ... while parsing SQL query: select count(*) OVER(PARTITION BY CAST(columns[0] as integer) ORDER BY cast(columns[0] as integer) RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED following EXCLUDE CURRENT ROW) from dfs.tmp.`t_alltype.csv` ^ [Error Id: ddfcd7fc-1a84-4e1f-8e51-34601e9155a6 on centos-04.qa.lab:31010] (state=,code=0) {noformat} >From the SQL specification, we need to add these. {noformat} <window frame exclusion> ::= EXCLUDE CURRENT ROW | EXCLUDE GROUP | EXCLUDE TIES | EXCLUDE NO OTHERS {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)