omegablitz opened a new issue #1064:
URL: https://github.com/apache/arrow-datafusion/issues/1064


   Thanks for the great library! Ran into the following issue while testing out 
some queries:
   
   **Describe the bug**
   UNION ALL does not give expected results when combining two tables. The 
minimal reproduction provided below panics.
   
   **To Reproduce**
   Minimal repro available here:
   https://github.com/omegablitz/datafusion-bug
   
   **Expected behavior**
   I expect the output to be:
   ```
   SUM(c) == 30
   SUM(d) == 300
   ```
   
   Instead, this example panics.
   
   **Additional context**
   If I explicitly change:
   ```
   SELECT a, b, c, 0.0 AS d FROM table_1
   UNION ALL
   SELECT a, b, 0.0 AS c, d FROM table_2
   ```
   
   to:
   ```
   SELECT a AS a, b AS b, c AS c, 0.0 AS d FROM table_1
   UNION ALL
   SELECT a AS a, b AS b, 0.0 AS c, d AS d FROM table_2
   ```
   it works


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to