You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by tk...@apache.org on 2026/02/20 10:52:47 UTC
(ignite) 03/03: IGNITE-xxxxx-rowid-poc Реализация
This is an automated email from the ASF dual-hosted git repository.
tkalkirill pushed a commit to branch ignite-xxxxx-rowid-poc
in repository https://gitbox.apache.org/repos/asf/ignite.git
commit 82ff0021c72f6b15238bddf296a7a31aacef43c0
Author: Kirill Tkalenko <tk...@yandex.ru>
AuthorDate: Fri Feb 20 13:49:46 2026 +0300
IGNITE-xxxxx-rowid-poc Реализация
---
.../processors/query/calcite/exec/IndexScan.java | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java
index 38034bc93ca..ea105632831 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java
@@ -17,6 +17,7 @@
package org.apache.ignite.internal.processors.query.calcite.exec;
import java.lang.reflect.Type;
+import java.util.Base64;
import java.util.Iterator;
import java.util.List;
import org.apache.calcite.rel.type.RelDataType;
@@ -38,6 +39,7 @@ import org.apache.ignite.internal.cache.query.index.sorted.inline.SortedSegmente
import org.apache.ignite.internal.cache.query.index.sorted.inline.io.InlineIO;
import org.apache.ignite.internal.cache.query.index.sorted.keys.IndexKey;
import org.apache.ignite.internal.cache.query.index.sorted.keys.IndexKeyFactory;
+import org.apache.ignite.internal.processors.cache.CacheObjectContext;
import org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree;
import org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO;
import org.apache.ignite.internal.processors.cache.transactions.TransactionChanges;
@@ -220,7 +222,7 @@ public class IndexScan<Row> extends AbstractCacheColumnsScan<IndexRow, Row> {
for (int i = 0; i < idxFieldMapping.size(); ++i) {
int fieldIdx = idxFieldMapping.getInt(i);
- Object key = rowHnd.get(fieldIdx, bound);
+ Object key = transformIndexKey(rowHnd.get(fieldIdx, bound));
if (key != ectx.unspecifiedValue()) {
key = TypeUtils.fromInternal(ectx, key, fieldsStoreTypes[fieldIdx]);
@@ -486,4 +488,20 @@ public class IndexScan<Row> extends AbstractCacheColumnsScan<IndexRow, Row> {
throw new IgniteException(e);
}
}
+
+ Object transformIndexKey(Object o) {
+ if (idxFieldMapping.indexOf(2) < 0) {
+ return o;
+ }
+
+ try {
+ byte[] bytes = Base64.getDecoder().decode((String) o);
+
+ CacheObjectContext ctx = desc.cacheContext().cacheObjectContext();
+
+ return kctx.cacheObjects().unmarshal(ctx, bytes, null);
+ } catch (Exception e) {
+ throw new IgniteException("Failed to transform index key value: " + o, e);
+ }
+ }
}