drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2318) Query fails when an ORDER BY clause is used with WITH-CLAUSE
Date Fri, 11 Sep 2015 16:36:47 GMT

    [ https://issues.apache.org/jira/browse/DRILL-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741096#comment-14741096
] 

Victoria Markman commented on DRILL-2318:
-----------------------------------------

Verified fixed in 1.2.0

#Fri Sep 11 05:38:24 UTC 2015
git.commit.id.abbrev=b525692

Added tests in: Functional/Passing/subqueries/with_clause

> Query fails when an ORDER BY clause is used with WITH-CLAUSE
> ------------------------------------------------------------
>
>                 Key: DRILL-2318
>                 URL: https://issues.apache.org/jira/browse/DRILL-2318
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.8.0
>            Reporter: Abhishek Girish
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 1.2.0
>
>         Attachments: drillbit.log
>
>
> Adding a WITH clause with a simple CTE causes a query with an ORDER BY to fail. This
happens even when the CTE is unrelated to the main query. 
> *The following query fails to execute:*
> {code:sql}
> WITH 
>      x
>      AS (SELECT  ss_sold_date_sk a1
>          FROM  store_sales) 
> SELECT  x.a1
> FROM   x
> ORDER  BY 
>           x.a1;
> {code}
> Error:
> Query failed: SqlValidatorException: Table 'x' not found
> Log attached. 
> *The following query executes fine:*
> {code:sql}
> WITH 
>      x
>      AS (SELECT  ss_sold_date_sk a1
>          FROM  store_sales) 
> SELECT  x.a1
> FROM   x
> {code}



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

Mime
View raw message