nsivabalan commented on code in PR #14042:
URL: https://github.com/apache/hudi/pull/14042#discussion_r2400628163


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/index/ScheduleIndexActionExecutor.java:
##########
@@ -89,7 +89,15 @@ public Option<HoodieIndexPlan> execute() {
     Set<String> indexesInflightOrCompleted = 
getInflightAndCompletedMetadataPartitions(table.getMetaClient().getTableConfig());
     InstantGenerator instantGenerator = 
table.getMetaClient().getInstantGenerator();
 
-    Set<String> requestedPartitions = 
partitionIndexTypes.stream().map(MetadataPartitionType::getPartitionPath).collect(Collectors.toSet());
+    Set<String> requestedPartitions = partitionIndexTypes.stream().map(p -> {
+      HoodieMetadataConfig metadataConfig = config.getMetadataConfig();
+      if (MetadataPartitionType.EXPRESSION_INDEX.equals(p)) {
+        return 
getSecondaryOrExpressionIndexName(metadataConfig::getExpressionIndexName, 
PARTITION_NAME_EXPRESSION_INDEX_PREFIX, 
metadataConfig.getExpressionIndexColumn());
+      } else if (MetadataPartitionType.SECONDARY_INDEX.equals(p)) {
+        return 
getSecondaryOrExpressionIndexName(metadataConfig::getSecondaryIndexName, 
PARTITION_NAME_SECONDARY_INDEX_PREFIX, 
metadataConfig.getSecondaryIndexColumn());
+      }
+      return p.getPartitionPath();
+    }).collect(Collectors.toSet());
     requestedPartitions.addAll(partitionPaths);

Review Comment:
   L101 
   ```
   requestedPartitions.addAll(partitionPaths);
   ```
   already adds the newly requested index of interest. 
   So, why do we need L 92 to 100?
   



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

Reply via email to