201573 commented on code in PR #18699:
URL: https://github.com/apache/hudi/pull/18699#discussion_r3204662149
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/index/HoodieSparkIndexClient.java:
##########
@@ -150,7 +162,18 @@ public void
createOrUpdateColumnStatsIndexDefinition(HoodieTableMetaClient metaC
}
private void createExpressionOrSecondaryIndex(HoodieTableMetaClient
metaClient, String userIndexName, String indexType,
- Map<String, Map<String,
String>> columns, Map<String, String> options, Map<String, String>
tableProperties) throws Exception {
+ Map<String, Map<String,
String>> columns, Map<String, String> options, Map<String, String>
tableProperties,
+ boolean ignoreIfExists) throws
Exception {
+ String fullIndexName = indexType.equals(PARTITION_NAME_SECONDARY_INDEX)
+ ? PARTITION_NAME_SECONDARY_INDEX_PREFIX + userIndexName
+ : PARTITION_NAME_EXPRESSION_INDEX_PREFIX + userIndexName;
+ if (indexExists(metaClient, fullIndexName)) {
Review Comment:
Thanks. I kept the nested shape here to match the record-index guard above
and make the plain CREATE INDEX path fall through to the existing
duplicate-index check in
HoodieIndexUtils.getSecondaryOrExpressionIndexDefinition. That keeps the two
CREATE INDEX paths visually consistent.
--
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]