201573 commented on code in PR #18699:
URL: https://github.com/apache/hudi/pull/18699#discussion_r3203550653
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/index/HoodieSparkIndexClient.java:
##########
@@ -150,7 +162,16 @@ 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) && ignoreIfExists) {
Review Comment:
Done, updated this guard to match the nested shape used in
createRecordIndex. Verified with git diff --check and the hudi-spark-client
Spark 3.5 build.
--
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]