Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.8.0
-
None
Description
The following query fails to execute:
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. ...
Log snippet attached.
Changing the alias from 'y' to 'x' in the second sub-query will solve the issue.
Attachments
Attachments
Issue Links
- depends upon
-
DRILL-2207 Fix Union All Operator
- Resolved
- is related to
-
DRILL-2376 UNION ALL on Aggregates with GROUP BY returns incomplete results
- Closed