ibessonov commented on code in PR #2247:
URL: https://github.com/apache/ignite-3/pull/2247#discussion_r1241859836


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogServiceImpl.java:
##########
@@ -275,11 +281,16 @@ public CompletableFuture<Void> 
createTable(CreateTableParams params) {
 
             CatalogZoneDescriptor zone = getZone(catalog, 
Objects.requireNonNullElse(params.zone(), DEFAULT_ZONE_NAME));
 
-            CatalogTableDescriptor table = 
CatalogUtils.fromParams(catalog.objectIdGenState(), zone.id(), params);
+            int id = catalog.objectIdGenState();
+
+            CatalogTableDescriptor table = CatalogUtils.fromParams(id++, 
zone.id(), params);
+
+            CatalogHashIndexDescriptor pkIndex = 
createHashIndexDescriptor(table, id++, createPkIndexParams(params));

Review Comment:
   Every other method uses pair
   "validate" (optional)
   "CatalogUtils.fromParams"
   And hash indexes are the only ones that use "createHashIndexDescriptor". 
This is what's inconsistent here - different code patterns, lack of unified 
approach



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