lowka commented on code in PR #6406:
URL: https://github.com/apache/ignite-3/pull/6406#discussion_r2269488062
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/partitionawareness/PartitionAwarenessMetadataExtractor.java:
##########
@@ -113,11 +124,31 @@ public static PartitionAwarenessMetadata
getMetadata(IgniteKeyValueModify kv) {
if (expr instanceof RexDynamicParam) {
RexDynamicParam dynamicParam = (RexDynamicParam) expr;
indexes[i] = dynamicParam.getIndex();
+ onlyLiterals = false;
+ } else if (expr instanceof RexLiteral) {
+ RexLiteral expr0 = (RexLiteral) expr;
+
+ // depends on supplied zoneId, it can`t be cached
+ if (expr0.getTypeName() ==
SqlTypeName.TIMESTAMP_WITH_LOCAL_TIME_ZONE) {
+ return null;
+ }
+
+ indexes[i] = hashPos--;
+ NativeType nativeType =
IgniteTypeFactory.relDataTypeToNative(expr0.getType());
+ Object val = getValueFromLiteral(nativeType, expr0);
Review Comment:
`getValueFromLiteral` does not support (lit.getValueAs(javaClass) won't
handle neither Period nor Duration) perhaps we should skip interval types as
well with a link to the issue on full support of interval types?
--
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]