mihaibudiu commented on code in PR #5407:
URL: https://github.com/apache/calcite/pull/5407#discussion_r4540891557
##########
core/src/test/java/org/apache/calcite/test/TypeCoercionTest.java:
##########
@@ -270,6 +270,57 @@ private static ImmutableList<RelDataType> combine(
+ " DOUBLE NOT NULL T1_DOUBLE) NOT NULL");
}
+ /** Type widening must preserve the nullability of nested set operations. */
+ @Test void testSetOperationCoercionNullability() {
+ final String notNullInt = "select x from (values (1)) as t(x)";
+ final String nullableInt =
+ "select x from (values (1), (cast(null as integer))) as t(x)";
+ final String nullableBigint =
+ "select x from (values (cast(1 as bigint)), (cast(null as bigint))) as
t(x)";
+
+ // union
+ sql(notNullInt + " union " + nullableBigint)
Review Comment:
union never was a problem.
--
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]