lowka commented on code in PR #4613: URL: https://github.com/apache/ignite-3/pull/4613#discussion_r1811853770
########## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/TypeUtils.java: ########## @@ -108,22 +109,29 @@ public class TypeUtils { ); private static class SupportedParamClassesHolder { - static final Set<Class<?>> supportedParamClasses; + // TODO: https://issues.apache.org/jira/browse/IGNITE-17373 + static final Set<ColumnType> UNSUPPORTED_COLUMN_TYPES_AS_PARAMETERS = Set.of(ColumnType.PERIOD, ColumnType.DURATION); + static final Set<Class<?>> SUPPORTED_PARAM_CLASSES; static { - supportedParamClasses = Arrays.stream(ColumnType.values()).map(ColumnType::javaClass).collect(Collectors.toSet()); - supportedParamClasses.add(boolean.class); - supportedParamClasses.add(byte.class); - supportedParamClasses.add(short.class); - supportedParamClasses.add(int.class); - supportedParamClasses.add(long.class); - supportedParamClasses.add(float.class); - supportedParamClasses.add(double.class); + Set<Class<?>> supportedClasses = Arrays.stream(ColumnType.values()) + .filter(t -> !UNSUPPORTED_COLUMN_TYPES_AS_PARAMETERS.contains(t)) + .map(ColumnType::javaClass).collect(Collectors.toSet()); + + supportedClasses.add(boolean.class); + supportedClasses.add(byte.class); Review Comment: I think it would be better to remove primitive types, because it is not possible to cast a primitive to an object and then get a class of that object and receive a class that represents a primitive. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org