jtuglu1 commented on code in PR #18515:
URL: https://github.com/apache/druid/pull/18515#discussion_r2378446715
##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataConnector.java:
##########
@@ -371,15 +378,28 @@ public void createSegmentTable(final String tableName)
StringUtils.format(
createStatementBuilder.toString(),
tableName, getPayloadType(), getQuoteString(), getCollation()
- ),
- StringUtils.format("CREATE INDEX idx_%1$s_used ON %1$s(used)",
tableName),
- StringUtils.format(
- "CREATE INDEX idx_%1$s_datasource_used_end_start ON
%1$s(dataSource, used, %2$send%2$s, start)",
- tableName,
- getQuoteString()
)
)
);
+
+ final Set<String> createdIndexSet = getIndexOnTable(tableName);
+ createIndex(
+ tableName,
+ "idx_%s_used",
+ List.of("used"),
+ createdIndexSet
+ );
+ createIndex(
+ tableName,
+ "idx_%s_datasource_used_end_start",
+ List.of(
+ "dataSource",
+ "used",
+ StringUtils.format("%send%S", getQuoteString(), getQuoteString()),
Review Comment:
Previous code does this. This should normally capitalize the string but
there's no capitalized equivalent for any engines' quote string. I had left to
reduce diff area. Updated.
--
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]