timoninmaxim commented on code in PR #10316:
URL: https://github.com/apache/ignite/pull/10316#discussion_r1009226702


##########
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java:
##########
@@ -268,6 +272,39 @@ static void assertIndex(Ignite node, String cacheName, 
String tblName,
         assertInternalIndexParams(typeDesc, idxName, inlineSize);
     }
 
+    /**
+     * Forms full list of index fields. It is assumed that cache has the only 
QueryEntity.
+     *
+     * @param cache Cache with index.
+     * @param idxName Index name.
+     * @param fields Index fields specified in configuration or DDL.
+     */
+    static Collection<IgniteBiTuple<String, Boolean>> idxFields(IgniteCache<?, 
?> cache, String idxName,
+        IgniteBiTuple<String, Boolean>... fields) {
+        QueryEntity qryEntity = 
(QueryEntity)cache.getConfiguration(CacheConfiguration.class)
+            .getQueryEntities().iterator().next();
+
+        boolean isStaticIdx = qryEntity.getIndexes().stream()

Review Comment:
   We should not rely on that, it actually looks like a bug. QueryEntity must 
be up to date after index creation.



##########
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java:
##########
@@ -268,6 +272,39 @@ static void assertIndex(Ignite node, String cacheName, 
String tblName,
         assertInternalIndexParams(typeDesc, idxName, inlineSize);
     }
 
+    /**
+     * Forms full list of index fields. It is assumed that cache has the only 
QueryEntity.

Review Comment:
   Let's add an assert, that `getQueryEntities` returns single object only.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/management/SchemaManager.java:
##########
@@ -1086,6 +1087,15 @@ public Collection<TableDescriptor> tablesForCache(String 
cacheName) {
         }
     }
 
+    /**
+     * @return Collection of all present index descriptors.
+     */
+    public Collection<IndexDescriptor> getAllIndexes() {

Review Comment:
   `get`, `set`, `is` prefixes are not allowed in Ignite internal API.



-- 
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]

Reply via email to