drill-dev 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] [Resolved] (DRILL-2377) UNION ALL on Aggregates with GROUP BY returns null when column aliases don't match
Date Thu, 14 May 2015 18:45:00 GMT

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

Sean Hsuan-Yi Chu resolved DRILL-2377.
--------------------------------------
    Resolution: Pending Closed

> UNION ALL on Aggregates with GROUP BY returns null when column aliases don't match
> ----------------------------------------------------------------------------------
>
>                 Key: DRILL-2377
>                 URL: https://issues.apache.org/jira/browse/DRILL-2377
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.9.0
>            Reporter: Abhishek Girish
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 1.2.0
>
>
> The following query returns null :
> {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
> GROUP BY x;
> Results from Drill:
> +------------+
> |     x      |
> +------------+
> | null       |
> +------------+
> 1 row selected (3.458 seconds)
> Results from Postgres:
>        x       
> ---------------
>  3658019159.35
>  5265207074.51
> (2 rows)
> {code}
> Removing the GROUP BY returns correct results:
> {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
> Results from Drill:
> +------------+
> |     x      |
> +------------+
> | 5265207074.51 |
> | 3658019159.35 |
> +------------+
> 2 rows selected (3.46 seconds)
> {code}



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

Mime
View raw message