Deneche A. Hakim created DRILL-3359:
---------------------------------------

             Summary: 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
            Reporter: Deneche A. Hakim
            Assignee: Sean Hsuan-Yi Chu


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)

Reply via email to