snuyanzin commented on code in PR #4389:
URL: https://github.com/apache/calcite/pull/4389#discussion_r2097244528
##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -5238,6 +5238,35 @@ private ImmutableList<ImmutableBitSet>
cube(ImmutableBitSet... sets) {
.fails("Type mismatch in column 1 of UNION");
sql("select ^slacker^ from emp union select name from dept").ok();
+
+ sql("select ^name^ from dept union select name from dept union select
slacker from emp")
+ .withTypeCoercion(false)
+ .fails("Type mismatch in column 1 of UNION");
Review Comment:
yes, because then one of the union will be between `SELECT` and the result
of the `UNION` or other operator.
>Do we need to add two additional union cases?
not sure about this since it doesn't introduce any new behavior
--
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]