NobiGo commented on code in PR #2811:
URL: https://github.com/apache/calcite/pull/2811#discussion_r1772440618
##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -1958,7 +1959,33 @@ private RelOptUtil.Exists convertExists(
if (!values.getTuples().isEmpty()) {
unionInputs.add(values);
}
- resultRel = LogicalUnion.create(unionInputs, true);
+ RelDataType finalRowType = rowType;
Review Comment:
In Calcite, we don't add cast if the source type precedence list contains a
target type if type is integer types (smallint, tinyint, integer, and bigint).
But if we don't add cast, the SQL output will be wrong.
So In this PR, I will add cast even if the source type precedence list
contains the target type(only works in integer types). The corresponding code
in AbstractTypeCoercion.java.
--
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]