tkalkirill commented on code in PR #2500:
URL: https://github.com/apache/ignite-3/pull/2500#discussion_r1319461984


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ClusterPerClassIntegrationTest.java:
##########
@@ -603,25 +585,26 @@ protected IgniteSql igniteSql() {
     }
 
     /**
-     * Returns the index ID from the configuration, {@code null} if there is 
no index configuration.
+     * Returns the index ID from the catalog, {@code null} if there is no 
index.
      *
      * @param node Node.
      * @param indexName Index name.
      */
     static @Nullable Integer indexId(Ignite node, String indexName) {
-        TableIndexConfiguration indexConfig = getIndexConfiguration(node, 
indexName);
+        CatalogIndexDescriptor indexDescriptor = getIndexDescriptor(node, 
indexName);
 
-        return indexConfig == null ? null : indexConfig.id().value();
+        return indexDescriptor == null ? null : indexDescriptor.id();
     }
 
     /**
-     * Returns table configuration of the given table at the given node, or 
{@code null} if no such table exists.
+     * Returns table descriptor of the given table at the given node, or 
{@code null} if no such table exists.
      *
      * @param node Node.
      * @param tableName Table name.
-     * @return Table configuration.
      */
-    private static @Nullable TableConfiguration getTableConfiguration(Ignite 
node, String tableName) {
-        return 
getTablesConfiguration(node).tables().get(tableName.toUpperCase());
+    private static @Nullable CatalogTableDescriptor getTableDescriptor(Ignite 
node, String tableName) {
+        IgniteImpl nodeImpl = (IgniteImpl) node;
+
+        return getTable(nodeImpl.catalogManager(), tableName, 
nodeImpl.clock().nowLong());

Review Comment:
   I think that for tests it will not be dangerous to use NOW, since most 
likely we will wait for the completion of the operation to create (or another 
operation) an index/table/zone for one node.
   If something goes wrong, we can fix it point by point.



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

Reply via email to