Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
as part of DRILL-3188, the following query is not supported and Drill displays the proper error message:
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
But when defining the same window using a WINDOW AS, Drill doesn't throw any error:
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)
The results are, of course, incorrect