You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by al...@apache.org on 2022/09/01 07:15:01 UTC

[ignite-extensions] branch master updated: IGNITE-15424 Fix geo spatial indexes to work with new schema manager - Fixes #174.

This is an automated email from the ASF dual-hosted git repository.

alexpl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git


The following commit(s) were added to refs/heads/master by this push:
     new 03c7c37  IGNITE-15424 Fix geo spatial indexes to work with new schema manager - Fixes #174.
03c7c37 is described below

commit 03c7c3790fc077c449131fee0962dbe7e5c07754
Author: Aleksey Plekhanov <pl...@gmail.com>
AuthorDate: Thu Sep 1 10:11:57 2022 +0300

    IGNITE-15424 Fix geo spatial indexes to work with new schema manager - Fixes #174.
    
    Signed-off-by: Aleksey Plekhanov <pl...@gmail.com>
---
 .../query/h2/opt/GeoSpatialClientIndex.java        | 12 ---
 .../h2/opt/GeoSpatialClientIndexDefinition.java    | 24 +-----
 .../query/h2/opt/GeoSpatialIndexDefinition.java    | 10 ---
 .../h2/opt/GeoSpatialIndexDescriptorFactory.java   | 87 ++++++++++++++++++++++
 .../query/h2/opt/GeoSpatialIndexImpl.java          |  9 +--
 .../processors/query/h2/opt/GeoSpatialUtils.java   | 61 ++-------------
 .../query/h2/opt/GridH2SpatialClientIndex.java     |  5 +-
 .../query/h2/opt/GridH2SpatialIndex.java           |  8 +-
 .../query/h2/H2IndexesSystemViewTest.java          | 10 ++-
 9 files changed, 112 insertions(+), 114 deletions(-)

diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndex.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndex.java
index b643703..d5c13c8 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndex.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndex.java
@@ -17,12 +17,10 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
-import java.util.List;
 import java.util.UUID;
 import org.apache.ignite.internal.cache.query.index.sorted.IndexRow;
 import org.apache.ignite.internal.cache.query.index.sorted.client.AbstractClientIndex;
 import org.apache.ignite.internal.util.lang.GridCursor;
-import org.h2.table.IndexColumn;
 import org.h2.table.TableFilter;
 import org.locationtech.jts.geom.Geometry;
 
@@ -53,16 +51,6 @@ public class GeoSpatialClientIndex extends AbstractClientIndex implements GeoSpa
         return def.idxName().idxName();
     }
 
-    /** */
-    public GridH2Table tbl() {
-        return def.tbl();
-    }
-
-    /** */
-    public List<IndexColumn> cols() {
-        return def.cols();
-    }
-
     /** {@inheritDoc} */
     @Override public GridCursor<IndexRow> find(int seg, TableFilter filter) {
         throw unsupported();
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndexDefinition.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndexDefinition.java
index dc03d37..12c2900 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndexDefinition.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialClientIndexDefinition.java
@@ -18,11 +18,9 @@
 package org.apache.ignite.internal.processors.query.h2.opt;
 
 import java.util.LinkedHashMap;
-import java.util.List;
 import org.apache.ignite.internal.cache.query.index.IndexDefinition;
 import org.apache.ignite.internal.cache.query.index.IndexName;
 import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyDefinition;
-import org.h2.table.IndexColumn;
 
 /**
  * Definition of Geo-Spatial client index.
@@ -34,33 +32,13 @@ public class GeoSpatialClientIndexDefinition implements IndexDefinition {
     /** */
     private final IndexName idxName;
 
-    /** */
-    private final GridH2Table tbl;
-
-    /** */
-    private final List<IndexColumn> cols;
-
     /** */
     public GeoSpatialClientIndexDefinition(
-        GridH2Table tbl,
         IndexName idxName,
-        LinkedHashMap<String, IndexKeyDefinition> keyDefs,
-        List<IndexColumn> cols
+        LinkedHashMap<String, IndexKeyDefinition> keyDefs
     ) {
         this.idxName = idxName;
         this.keyDefs = keyDefs;
-        this.tbl = tbl;
-        this.cols = cols;
-    }
-
-    /** */
-    public GridH2Table tbl() {
-        return tbl;
-    }
-
-    /** */
-    public List<IndexColumn> cols() {
-        return cols;
     }
 
     /** {@inheritDoc} */
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDefinition.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDefinition.java
index db87ff6..efde362 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDefinition.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDefinition.java
@@ -27,9 +27,6 @@ import org.apache.ignite.internal.cache.query.index.sorted.QueryIndexRowHandler;
  * Definition of geo spatial index.
  */
 public class GeoSpatialIndexDefinition implements IndexDefinition {
-    /** */
-    private final GridH2Table tbl;
-
     /** */
     private final QueryIndexRowHandler rowHnd;
 
@@ -44,13 +41,11 @@ public class GeoSpatialIndexDefinition implements IndexDefinition {
 
     /** */
     public GeoSpatialIndexDefinition(
-        GridH2Table tbl,
         IndexName idxName,
         LinkedHashMap<String, IndexKeyDefinition> keyDefs,
         QueryIndexRowHandler rowHnd,
         int segmentsCnt
     ) {
-        this.tbl = tbl;
         this.idxName = idxName;
         this.rowHnd = rowHnd;
         this.keyDefs = keyDefs;
@@ -67,11 +62,6 @@ public class GeoSpatialIndexDefinition implements IndexDefinition {
         return segmentsCnt;
     }
 
-    /** */
-    public GridH2Table getTable() {
-        return tbl;
-    }
-
     /** {@inheritDoc} */
     @Override public IndexName idxName() {
         return idxName;
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDescriptorFactory.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDescriptorFactory.java
new file mode 100644
index 0000000..fc58fec
--- /dev/null
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexDescriptorFactory.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.query.h2.opt;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.cache.query.index.Index;
+import org.apache.ignite.internal.cache.query.index.IndexDefinition;
+import org.apache.ignite.internal.cache.query.index.IndexFactory;
+import org.apache.ignite.internal.cache.query.index.IndexName;
+import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyDefinition;
+import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyTypeSettings;
+import org.apache.ignite.internal.cache.query.index.sorted.QueryIndexRowHandler;
+import org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexKeyType;
+import org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexKeyTypeRegistry;
+import org.apache.ignite.internal.processors.cache.GridCacheContextInfo;
+import org.apache.ignite.internal.processors.query.GridQueryIndexDescriptor;
+import org.apache.ignite.internal.processors.query.GridQueryTypeDescriptor;
+import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheVisitor;
+import org.apache.ignite.internal.processors.query.schema.management.AbstractIndexDescriptorFactory;
+import org.apache.ignite.internal.processors.query.schema.management.IndexDescriptor;
+import org.apache.ignite.internal.processors.query.schema.management.TableDescriptor;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Index descriptor factory for creating geo spatial indexes.
+ */
+public class GeoSpatialIndexDescriptorFactory extends AbstractIndexDescriptorFactory {
+    /** Dummy key types. */
+    private static final IndexKeyTypeSettings DUMMY_SETTINGS = new IndexKeyTypeSettings();
+
+    /** Instance of the factory. */
+    public static final GeoSpatialIndexDescriptorFactory INSTANCE = new GeoSpatialIndexDescriptorFactory();
+
+    /** {@inheritDoc} */
+    @Override public IndexDescriptor create(
+        GridKernalContext ctx,
+        GridQueryIndexDescriptor idxDesc,
+        TableDescriptor tbl,
+        @Nullable SchemaIndexCacheVisitor cacheVisitor
+    ) {
+        GridCacheContextInfo<?, ?> cacheInfo = tbl.cacheInfo();
+        GridQueryTypeDescriptor typeDesc = tbl.type();
+        LinkedHashMap<String, IndexKeyDefinition> keyDefs = indexDescriptorToKeysDefinition(idxDesc, typeDesc);
+        IndexName name = new IndexName(typeDesc.cacheName(), typeDesc.schemaName(), typeDesc.tableName(), idxDesc.name());
+
+        IndexDefinition idxDef;
+        IndexFactory idxFactory;
+
+        if (cacheInfo.affinityNode()) {
+            idxFactory = GeoSpatialIndexFactory.INSTANCE;
+            List<InlineIndexKeyType> idxKeyTypes = InlineIndexKeyTypeRegistry.types(keyDefs.values(), DUMMY_SETTINGS);
+
+            QueryIndexRowHandler rowHnd = new QueryIndexRowHandler(
+                tbl.type(), tbl.cacheInfo(), keyDefs, idxKeyTypes, DUMMY_SETTINGS);
+
+            final int segments = tbl.cacheInfo().config().getQueryParallelism();
+
+            idxDef = new GeoSpatialIndexDefinition(name, keyDefs, rowHnd, segments);
+        }
+        else {
+            idxFactory = GeoSpatialClientIndexFactory.INSTANCE;
+
+            idxDef = new GeoSpatialClientIndexDefinition(name, keyDefs);
+        }
+
+        Index idx = ctx.indexProcessor().createIndex(cacheInfo.cacheContext(), idxFactory, idxDef);
+
+        return new IndexDescriptor(tbl, idxDesc.name(), idxDesc.type(), keyDefs, false, false, -1, idx);
+    }
+}
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexImpl.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexImpl.java
index 0c66ab5..65dc54a 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexImpl.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialIndexImpl.java
@@ -27,6 +27,7 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.cache.query.index.AbstractIndex;
 import org.apache.ignite.internal.cache.query.index.SingleCursor;
 import org.apache.ignite.internal.cache.query.index.sorted.IndexRow;
@@ -105,13 +106,11 @@ public class GeoSpatialIndexImpl extends AbstractIndex implements GeoSpatialInde
 
     /** */
     IndexLookupBatch createLookupBatch(TableFilter[] filters, int filter) {
-        GridH2Table table = def.getTable();
-
-        if (table.isPartitioned()) {
+        if (cctx.config().getCacheMode() == CacheMode.PARTITIONED) {
             assert filter > 0; // Lookup batch will not be created for the first table filter.
 
             throw DbException.throwInternalError(
-                "Table with a spatial index must be the first in the query: " + table);
+                "Table with a spatial index must be the first in the query: " + def.idxName().tableName());
         }
 
         return null; // Support must be explicitly added.
@@ -299,7 +298,7 @@ public class GeoSpatialIndexImpl extends AbstractIndex implements GeoSpatialInde
             qryFilter = qctx.filter();
 
         IndexingQueryCacheFilter qryCacheFilter = qryFilter != null ?
-            qryFilter.forCache(def.getTable().cacheName()) : null;
+            qryFilter.forCache(cctx.name()) : null;
 
         List<IndexRow> rows = new ArrayList<>();
 
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialUtils.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialUtils.java
index 68cd2fa..9f4bece 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialUtils.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GeoSpatialUtils.java
@@ -17,20 +17,13 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
-import java.util.LinkedHashMap;
 import java.util.List;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.internal.cache.query.index.Index;
-import org.apache.ignite.internal.cache.query.index.IndexDefinition;
-import org.apache.ignite.internal.cache.query.index.IndexName;
-import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyDefinition;
+import org.apache.ignite.cache.QueryIndexType;
 import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyType;
-import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyTypeSettings;
-import org.apache.ignite.internal.cache.query.index.sorted.QueryIndexRowHandler;
-import org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexKeyType;
-import org.apache.ignite.internal.cache.query.index.sorted.inline.InlineIndexKeyTypeRegistry;
 import org.apache.ignite.internal.cache.query.index.sorted.keys.IndexKeyFactory;
-import org.apache.ignite.internal.processors.query.h2.H2Utils;
+import org.apache.ignite.internal.processors.query.schema.management.IndexDescriptor;
+import org.apache.ignite.internal.processors.query.schema.management.SchemaManager;
 import org.h2.table.IndexColumn;
 import org.locationtech.jts.geom.Geometry;
 
@@ -38,61 +31,21 @@ import org.locationtech.jts.geom.Geometry;
  * This class is entrypoint for creating Geo-Spatial index.
  */
 public class GeoSpatialUtils {
-    /** Dummy key types. */
-    private static final IndexKeyTypeSettings DUMMY_SETTINGS = new IndexKeyTypeSettings();
-
     static {
+        SchemaManager.registerIndexDescriptorFactory(QueryIndexType.GEOSPATIAL, GeoSpatialIndexDescriptorFactory.INSTANCE);
         IndexKeyFactory.register(IndexKeyType.GEOMETRY, k -> new GeometryIndexKey((Geometry)k));
     }
 
     /** */
-    public static GridH2IndexBase createIndex(GridH2Table tbl, String idxName, List<IndexColumn> cols) {
+    public static GridH2IndexBase createIndex(GridH2Table tbl, IndexDescriptor idxDesc, List<IndexColumn> cols) {
         try {
-            IndexName name = new IndexName(tbl.cacheName(), tbl.getSchema().getName(), tbl.getName(), idxName);
-
-            LinkedHashMap<String, IndexKeyDefinition> keyDefs = H2Utils.columnsToKeyDefinitions(tbl, cols);
-
             if (tbl.cacheInfo().affinityNode())
-                return createIndex(tbl, name, keyDefs, cols);
+                return new GridH2SpatialIndex(tbl, cols, idxDesc.index().unwrap(GeoSpatialIndexImpl.class));
             else
-                return createClientIndex(tbl, name, keyDefs, cols);
+                return new GridH2SpatialClientIndex(tbl, cols, idxDesc.index().unwrap(GeoSpatialClientIndex.class));
         }
         catch (Exception e) {
             throw new IgniteException("Failed to instantiate", e);
         }
     }
-
-    /** Creates index for server Ignite nodes. */
-    private static GridH2SpatialIndex createIndex(
-        GridH2Table tbl,
-        IndexName name,
-        LinkedHashMap<String, IndexKeyDefinition> keyDefs,
-        List<IndexColumn> cols
-    ) {
-        List<InlineIndexKeyType> idxKeyTypes = InlineIndexKeyTypeRegistry.types(keyDefs.values(), DUMMY_SETTINGS);
-
-        QueryIndexRowHandler rowHnd = new QueryIndexRowHandler(tbl.rowDescriptor(), keyDefs, idxKeyTypes, DUMMY_SETTINGS);
-
-        final int segments = tbl.cacheInfo().config().getQueryParallelism();
-
-        IndexDefinition def = new GeoSpatialIndexDefinition(tbl, name, keyDefs, rowHnd, segments);
-
-        Index idx = tbl.idxProc().createIndex(tbl.cacheContext(), GeoSpatialIndexFactory.INSTANCE, def);
-
-        return new GridH2SpatialIndex(tbl, cols, idx.unwrap(GeoSpatialIndexImpl.class));
-    }
-
-    /** Creates index for client Ignite nodes. */
-    private static GridH2SpatialClientIndex createClientIndex(
-        GridH2Table tbl,
-        IndexName name,
-        LinkedHashMap<String, IndexKeyDefinition> keyDefs,
-        List<IndexColumn> cols
-    ) {
-        IndexDefinition def = new GeoSpatialClientIndexDefinition(tbl, name, keyDefs, cols);
-
-        Index idx = tbl.idxProc().createIndex(tbl.cacheContext(), GeoSpatialClientIndexFactory.INSTANCE, def);
-
-        return new GridH2SpatialClientIndex(idx.unwrap(GeoSpatialClientIndex.class));
-    }
 }
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialClientIndex.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialClientIndex.java
index fd7d197..2b7df45 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialClientIndex.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialClientIndex.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.query.h2.opt;
 
+import java.util.List;
 import org.apache.ignite.internal.cache.query.index.sorted.client.AbstractClientIndex;
 import org.apache.ignite.spi.indexing.IndexingQueryCacheFilter;
 import org.h2.engine.Session;
@@ -32,8 +33,8 @@ public class GridH2SpatialClientIndex extends GridH2SpatialBaseIndex {
     private final AbstractClientIndex delegate;
 
     /** */
-    public GridH2SpatialClientIndex(GeoSpatialClientIndex delegate) {
-        super(delegate.tbl(), delegate.name(), delegate.cols().toArray(new IndexColumn[0]),
+    public GridH2SpatialClientIndex(GridH2Table tbl, List<IndexColumn> cols, GeoSpatialClientIndex delegate) {
+        super(tbl, delegate.name(), cols.toArray(new IndexColumn[0]),
             IndexType.createNonUnique(false, false, true));
 
         this.delegate = delegate;
diff --git a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
index 74d602b..42555cd 100644
--- a/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
+++ b/modules/geospatial-ext/geospatial/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2SpatialIndex.java
@@ -45,7 +45,7 @@ public class GridH2SpatialIndex extends GridH2SpatialBaseIndex {
     /** */
     public GridH2SpatialIndex(GridH2Table tbl, List<IndexColumn> cols, GeoSpatialIndexImpl idx) {
         super(tbl,
-            idx.def.idxName().idxName(),
+            idx.name(),
             cols.toArray(new IndexColumn[0]),
             IndexType.createNonUnique(false, false, true));
 
@@ -63,10 +63,10 @@ public class GridH2SpatialIndex extends GridH2SpatialBaseIndex {
     }
 
     /** {@inheritDoc} */
-    @Override public void destroy(boolean rmIdx) {
-        delegate.destroy(!rmIdx);
+    @Override public void destroy() {
+        delegate.destroy(false);
 
-        super.destroy(rmIdx);
+        super.destroy();
     }
 
     /** {@inheritDoc} */
diff --git a/modules/geospatial-ext/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexesSystemViewTest.java b/modules/geospatial-ext/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexesSystemViewTest.java
index 35b5847..87a8498 100644
--- a/modules/geospatial-ext/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexesSystemViewTest.java
+++ b/modules/geospatial-ext/geospatial/src/test/java/org/apache/ignite/internal/processors/query/h2/H2IndexesSystemViewTest.java
@@ -73,10 +73,12 @@ public class H2IndexesSystemViewTest extends GridCommonAbstractTest {
             assertTrue(srvNodeIndexes.contains(idx));
 
         Object[][] expectedResults = {
-                {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "IDX_GEO_1", "SPATIAL", "\"GEOM\" ASC", false, false, null},
-                {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "__SCAN_", "SCAN", null, false, false, null},
-                {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "_key_PK", "BTREE", "\"ID1\" ASC", true, true, 5},
-                {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "_key_PK_hash", "HASH", "\"ID1\" ASC", false, true, null}
+            {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "IDX_GEO_1", "GEOSPATIAL", "\"GEOM\" ASC",
+                false, false, -1},
+            {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "_key_PK", "SORTED", "\"_KEY\" ASC",
+                true, true, 5},
+            {-825022849, "SQL_PUBLIC_AFF_CACHE", "PUBLIC", "AFF_CACHE", "_key_PK_proxy", "SORTED", "\"ID1\" ASC",
+                false, true, 5},
         };
 
         for (int i = 0; i < srvNodeIndexes.size(); i++) {