ygerzhedovich commented on code in PR #5121:
URL: https://github.com/apache/ignite-3/pull/5121#discussion_r1933937426


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/AbstractCreateIndexCommand.java:
##########
@@ -83,9 +83,13 @@ public List<UpdateEntry> get(UpdateContext context) {
         Catalog catalog = context.catalog();
         CatalogSchemaDescriptor schema = schemaOrThrow(catalog, schemaName);
 
+        if (ifNotExists && schema.aliveIndex(indexName) != null) {
+            return List.of();
+        }
+
         ensureNoTableIndexOrSysViewExistsWithGivenName(schema, indexName);
 
-        CatalogTableDescriptor table = tableOrThrow(schema, tableName);
+        CatalogTableDescriptor table = tableOrThrow(schema, tableName, 
false).orElseThrow();

Review Comment:
   agree. amended to the second suggested way



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