[ https://issues.apache.org/jira/browse/DRILL-3359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603268#comment-14603268 ]
Victoria Markman commented on DRILL-3359: ----------------------------------------- Verified fixed in 1.1 #Thu Jun 25 23:56:00 EDT 2015 git.commit.id.abbrev=6503cfb "ROWS" frame was disabled completely. {code} 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows unbounded preceding) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: c8d6424a-1a84-4a4a-b335-47f5f9cc3e0b on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between unbounded preceding and current row) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: cc25c03c-eb4e-40a4-8b57-1ab37018d053 on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between current row and current row) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: 3aa94114-1454-47a2-a2dd-e2904effca62 on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between current row and unbounded following) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: 28615d33-82cc-4b8f-a73e-ea31d4f6355c on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between unbounded preceding and unbounded following) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: 054d6817-4b9c-4562-b726-3488df063b94 on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between unbounded preceding and 10 following) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: 844239a4-d121-43e8-88b4-57f51be7551f on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between 10 preceding and current row) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: d3442fbc-e9ae-459b-a5ff-4a0208496d37 on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between current row and 10 following) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: a5880dc2-1506-4707-a482-d57788555873 on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select sum(salary) over(partition by position_id order by salary rows between 1 preceding and 1 following) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: fb15d661-aa58-4a51-99f5-f1e33acb1260 on atsqa4-133.qa.lab:31010] (state=,code=0) 0: jdbc:drill:schema=dfs> select avg(salary) over(partition by position_id order by salary rows between 1 preceding and 1 following) from cp.`employee.json`; Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently not supported See Apache Drill JIRA: DRILL-3188 [Error Id: f4ff2f77-ddaa-48a7-b3e3-1f4f3430f37b on atsqa4-133.qa.lab:31010] (state=,code=0) {code} > Drill should throw and error when window function defined using WINDOW AS > uses ROWS UNBOUNDED PRECEDING > ------------------------------------------------------------------------------------------------------- > > Key: DRILL-3359 > URL: https://issues.apache.org/jira/browse/DRILL-3359 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Reporter: Deneche A. Hakim > Assignee: Sean Hsuan-Yi Chu > Labels: window_function > Fix For: 1.1.0 > > Attachments: DRILL-3359.1.patch > > > as part of DRILL-3188, the following query is not supported and Drill > displays the proper error message: > {noformat} > 0: jdbc:drill:zk=local> select sum(salary) over(partition by position_id > order by salary rows unbounded preceding) from cp.`employee.json` limit 20; > Error: UNSUPPORTED_OPERATION ERROR: This type of window frame is currently > not supported > See Apache Drill JIRA: DRILL-3188 > {noformat} > But when defining the same window using a WINDOW AS, Drill doesn't throw any > error: > {noformat} > 0: jdbc:drill:zk=local> select sum(salary) over w from cp.`employee.json` > window w as (partition by position_id order by salary rows unbounded > preceding) limit 20; > +-----------+ > | EXPR$0 | > +-----------+ > | 80000.0 | > | 30000.0 | > | 135000.0 | > | 135000.0 | > | 135000.0 | > | 215000.0 | > | 215000.0 | > | 25000.0 | > | 15000.0 | > | 50000.0 | > | 6700.0 | > | 14700.0 | > | 34700.0 | > | 34700.0 | > | 5000.0 | > | 13500.0 | > | 58500.0 | > | 5000.0 | > | 11700.0 | > | 20000.0 | > +-----------+ > 20 rows selected (0.348 seconds) > {noformat} > The results are, of course, incorrect -- This message was sent by Atlassian JIRA (v6.3.4#6332)