maytasm commented on code in PR #18515:
URL: https://github.com/apache/druid/pull/18515#discussion_r2383437801


##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataConnector.java:
##########
@@ -1106,46 +1150,56 @@ public ResultSet getIndexInfo(DatabaseMetaData 
databaseMetaData, String tableNam
   }
 
   /**
-   * create index on the table with retry if not already exist, to be called 
after createTable
+   * Create index on the table {@code tableName} with retry if not already 
exist, to be called after {@link #createTable}.
+   * Format of index name is either specified via legacy {@code 
legacyIndexNameFormat} or {@link #generateShortIndexName}.
    *
-   * @param tableName       Name of the table to create index on
-   * @param indexName       case-insensitive string index name, it helps to 
check the existing index on table
-   * @param indexCols       List of columns to be indexed on
-   * @param createdIndexSet
+   * @param tableName             Name of the table to create index on
+   * @param legacyIndexNameFormat Template to create index ID. If null, uses 
the format: {@code IDX_{table name}_{columns}}.

Review Comment:
   nit:
   - Add to javadoc on the expected format if legacyIndexNameFormat is 
specified (since this method will only substitute the tableName and that should 
be the only placeholder)
   - the name legacyIndexNameFormat might be misleading.  the current full 
index name is not legacy / replaced. It's just two alternative/options ... full 
vs short name , which we still support / keep both. So maybe just call it 
fullIndexNameFormat



##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataConnector.java:
##########
@@ -1106,46 +1150,56 @@ public ResultSet getIndexInfo(DatabaseMetaData 
databaseMetaData, String tableNam
   }
 
   /**
-   * create index on the table with retry if not already exist, to be called 
after createTable
+   * Create index on the table {@code tableName} with retry if not already 
exist, to be called after {@link #createTable}.
+   * Format of index name is either specified via legacy {@code 
legacyIndexNameFormat} or {@link #generateShortIndexName}.
    *
-   * @param tableName       Name of the table to create index on
-   * @param indexName       case-insensitive string index name, it helps to 
check the existing index on table
-   * @param indexCols       List of columns to be indexed on
-   * @param createdIndexSet
+   * @param tableName             Name of the table to create index on
+   * @param legacyIndexNameFormat Template to create index ID. If null, uses 
the format: {@code IDX_{table name}_{columns}}.

Review Comment:
   `@param fullIndexNameFormat Template to create index ID. If specified, the 
only placeholder should be for the tableName. If null, uses the format: {@code 
IDX_{table name}_{columns}}.`



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to