You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "korlov42 (via GitHub)" <gi...@apache.org> on 2023/06/02 13:26:55 UTC

[GitHub] [ignite-3] korlov42 commented on a diff in pull request #2085: IGNITE-19460 Sql. Implement missed DDL commands with using Catalog

korlov42 commented on code in PR #2085:
URL: https://github.com/apache/ignite-3/pull/2085#discussion_r1214368568


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java:
##########
@@ -41,6 +48,43 @@ public static TableDescriptor fromParams(int id, CreateTableParams params) {
         );
     }
 
+    /**
+     * Converts CreateIndex command params to hash index descriptor.
+     *
+     * @param id Index id.
+     * @param tableId Table id.
+     * @param params Parameters.
+     * @return Index descriptor.
+     */
+    public static IndexDescriptor fromParams(int id, int tableId, CreateHashIndexParams params) {
+        return new HashIndexDescriptor(id,
+                params.indexName(),
+                tableId,
+                true,

Review Comment:
   this actually should be `false`. The only valid case of creation of unique hash index is implicit creation of primary key



-- 
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-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org