caicancai commented on code in PR #3998:
URL: https://github.com/apache/calcite/pull/3998#discussion_r1792071521
##########
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:
I have always been confused about the usage of Calcite's
`SqlTypeUtil.isComparable`
--
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]