mihaibudiu commented on code in PR #3998:
URL: https://github.com/apache/calcite/pull/3998#discussion_r1792108410
##########
core/src/main/java/org/apache/calcite/sql/validate/implicit/TypeCoercionImpl.java:
##########
@@ -292,16 +292,17 @@ protected boolean binaryArithmeticWithStrings(
}
RelDataType commonType;
- if (SqlTypeUtil.sameNamedType(type1, type2)) {
+ // First check when one of the types is a string (see JavaDoc on
cmmonTypeForBinaryComparison)
+ commonType = commonTypeForBinaryComparison(type1, type2);
+ if (commonType == null && SqlTypeUtil.isComparable(type1, type2)) {
Review Comment:
This is about comparison operators, you'd think that if 2 values with types
are comparable, then the values can be compared by being cast to a common 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]