drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-2379) UNION ALL with ORDER BY fails when column aliases don't match
Date Tue, 10 Mar 2015 18:26:38 GMT

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

Sean Hsuan-Yi Chu updated DRILL-2379:
-------------------------------------
    Fix Version/s: 0.8.0

> UNION ALL with ORDER BY fails when column aliases don't match
> -------------------------------------------------------------
>
>                 Key: DRILL-2379
>                 URL: https://issues.apache.org/jira/browse/DRILL-2379
>             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: 0.8.0
>
>         Attachments: drillbit.log
>
>
> The following query fails to execute:
> {code:sql}
> SELECT x
> FROM
> (SELECT Sum(ss_ext_sales_price) x
> FROM  store_sales
> UNION ALL
> SELECT Sum(cs_ext_sales_price) y
> FROM catalog_sales) tmp
> ORDER BY x;
> SELECT x
> FROM
> (SELECT ss_ext_sales_price x
> FROM  store_sales
> UNION ALL
> SELECT cs_ext_sales_price y
> FROM catalog_sales) tmp
> ORDER BY x;
> SELECT x
> FROM
> (SELECT ss_ext_sales_price x
> FROM  store_sales
> UNION ALL
> SELECT ss_ext_sales_price y
> FROM store_sales) tmp
> ORDER BY x;
> Error from Drill:
> Query failed: RemoteRpcException: Failure while running fragment., Sort doesn't currently
support sorts with changing schemas. 
> java.lang.RuntimeException: java.sql.SQLException: Failure while executing query.
> ...
> {code}
> Log snippet attached. 
> Changing the alias from 'y' to 'x' in the second sub-query will solve the issue. 



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

Mime
View raw message