mihaibudiu commented on code in PR #4972:
URL: https://github.com/apache/calcite/pull/4972#discussion_r3314333451
##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -1901,6 +1902,31 @@ public RelNode convertToSingleValueSubq(
}
}
+ /**
+ * Ensures that a comparison expression has matching operand types. If the
+ * operands have different type names, casts the right operand to match the
+ * left operand's type. This handles the case where type coercion is disabled
+ * and the IN-to-OR expansion produces comparisons with mismatched types
+ * (e.g., DATE = CHAR).
+ */
+ private RexNode ensureComparisonTypes(RexNode node) {
Review Comment:
does this produce the same result as type coercion would?
Why not the leastRestrictive type?
--
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]