jonahgao commented on code in PR #14223:
URL: https://github.com/apache/datafusion/pull/14223#discussion_r1926255432


##########
datafusion/sqllogictest/test_files/union.slt:
##########
@@ -413,23 +413,23 @@ explain SELECT c1, c9 FROM aggregate_test_100 UNION ALL 
SELECT c1, c3 FROM aggre
 logical_plan
 01)Sort: aggregate_test_100.c9 DESC NULLS FIRST, fetch=5
 02)--Union
-03)----Projection: aggregate_test_100.c1, CAST(aggregate_test_100.c9 AS Int64) 
AS c9
+03)----Projection: aggregate_test_100.c1, CAST(aggregate_test_100.c9 AS 
Decimal128(20, 0)) AS c9
 04)------TableScan: aggregate_test_100 projection=[c1, c9]
-05)----Projection: aggregate_test_100.c1, CAST(aggregate_test_100.c3 AS Int64) 
AS c9
+05)----Projection: aggregate_test_100.c1, CAST(aggregate_test_100.c3 AS 
Decimal128(20, 0)) AS c9

Review Comment:
   This query unions `Int16` with `UInt64`.  We need to find a common type that 
can accommodate all possible values of these two types, such as `-1` and 
`u64::MAX`. Despite increasing the space, it makes the following query 
available.
   ```sh
   create table t1(a smallint) as values(1);
   create table t2(a bigint unsigned) as values(10000000000000000000);
   select * from t1 union select * from t2;
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to