Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Pending Closed
-
0.9.0
-
None
Description
The following query returns null :
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)
Removing the GROUP BY returns correct results:
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)
Attachments
Issue Links
- depends upon
-
DRILL-2207 Fix Union All Operator
- Resolved
-
DRILL-2376 UNION ALL on Aggregates with GROUP BY returns incomplete results
- Closed
- is related to
-
DRILL-2376 UNION ALL on Aggregates with GROUP BY returns incomplete results
- Closed