[
https://issues.apache.org/jira/browse/DRILL-3360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741348#comment-14741348
]
Victoria Markman commented on DRILL-3360:
-----------------------------------------
Verified fixed in 1.2.0
#Fri Sep 11 05:38:24 UTC 2015
git.commit.id.abbrev=b525692
{code}
0: jdbc:drill:schema=dfs> select rank() over(order by row_number() over(order
by c1)) from t1;
Error: VALIDATION ERROR: From line 1, column 19 to line 1, column 59: ORDER BY
expression should not contain OVER clause
[Error Id: d0b6ef18-e66f-44ec-961b-f62eb1980730 on atsqa4-133.qa.lab:31010]
(state=,code=0)
{code}
Test added in: Functional/Passing/window_functions/negative/drill-3360*
> Window function defined within another window function
> -------------------------------------------------------
>
> Key: DRILL-3360
> URL: https://issues.apache.org/jira/browse/DRILL-3360
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 1.1.0
> Environment: CentOS 4 node cluster
> Reporter: Khurram Faraaz
> Assignee: Sean Hsuan-Yi Chu
> Labels: window_function
> Fix For: 1.2.0
>
>
> Window function defined within another window function, Postgres 9.3 does not
> support this, Drill supports it and we see results being returned. We should
> not support this kind of query.
> From Postgres 9.3
> {code}
> postgres=# select rank() over(order by row_number() over(order by col_int))
> from vwOnParq_wCst;
> ERROR: window functions are not allowed in window definitions
> LINE 1: select rank() over(order by row_number() over(order by col_i...
> {code}
> From execution on Drill
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select rank() over(order by row_number()
> over(order by col_int)) from vwOnParq_wCst;
> +---------+
> | EXPR$0 |
> +---------+
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> | 6 |
> | 7 |
> | 8 |
> | 9 |
> | 10 |
> | 11 |
> | 12 |
> | 13 |
> | 14 |
> | 15 |
> | 16 |
> | 17 |
> | 18 |
> | 19 |
> | 20 |
> | 21 |
> | 22 |
> | 23 |
> | 24 |
> | 25 |
> | 26 |
> | 27 |
> | 28 |
> | 29 |
> | 30 |
> +---------+
> 30 rows selected (0.377 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)