[ 
https://issues.apache.org/jira/browse/DRILL-3681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Khurram Faraaz updated DRILL-3681:
----------------------------------
    Assignee: Sean Hsuan-Yi Chu  (was: Chris Westin)

> need a better error message
> ---------------------------
>
>                 Key: DRILL-3681
>                 URL: https://issues.apache.org/jira/browse/DRILL-3681
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>    Affects Versions: 1.2.0
>            Reporter: Khurram Faraaz
>            Assignee: Sean Hsuan-Yi Chu
>              Labels: window_function
>
> We need a better error message, our current error message does not make any 
> sense. The issue is that we define the window in the outer query and try to 
> use in the inner sub query. We need to report to user that the window "windw" 
> does not exist.
> Error reported by Drill
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select col1 , col2 , lead(col2) OVER windw FROM 
> (SELECT col0 , col1 , col2, col7 , ntile(3) over windw from FEWRWSPQQ_101) 
> sub_query WINDOW windw as (PARTITION BY col7 ORDER BY col0) ;
> Error: PARSE ERROR: From line 2147483647, column 2147483647 to line -1, 
> column -1: Table 'FEWRWSPQQ_101' not found
> [Error Id: 176f1284-04cb-4718-a582-b10c9a690e95 on centos-02.qa.lab:31010] 
> (state=,code=0)
> {code}
> Error reported by Postgres for same query and data
> {code}
> postgres=# select col1 , col2 , lead(col2) OVER windw FROM (SELECT col0 , 
> col1 , col2, col7 , ntile(3) over windw from FEWRWSPQQ_101) sub_query WINDOW 
> windw as (PARTITION BY col7 ORDER BY col0) ;
> ERROR:  window "windw" does not exist
> LINE 1: ... (SELECT col0 , col1 , col2, col7 , ntile(3) over windw from...
>                                                                               
>              ^
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to