korlov42 commented on code in PR #2196:
URL: https://github.com/apache/ignite-3/pull/2196#discussion_r1247553130
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/TypeUtils.java:
##########
@@ -533,6 +535,55 @@ public static NativeType columnType2NativeType(ColumnType
columnType, int precis
}
}
+ /** Checks whether cast operation is necessary in {@code SearchBound}. */
+ public static boolean needCastInSearchBounds(IgniteTypeFactory
typeFactory, RelDataType fromType, RelDataType toType) {
+ // Check custom data types first.
+ if (toType.getSqlTypeName() == SqlTypeName.ANY ||
fromType.getSqlTypeName() == SqlTypeName.ANY) {
Review Comment:
this predicate doesn't seem right... Method `customDataTypeNeedCast`
actually expects that at least one of the argument is instance of
IgniteCustomType. If there is an invariant that there should not be any ANY
type but IgniteCustomType, it's better to check it explicitly
--
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]