danny0405 commented on code in PR #11146:
URL: https://github.com/apache/hudi/pull/11146#discussion_r1610824721


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -437,9 +448,7 @@ private boolean initializeFromFilesystem(String 
initializationTime, List<Metadat
       HoodieData<HoodieRecord> records = 
fileGroupCountAndRecordsPair.getValue();
       bulkCommit(commitTimeForPartition, partitionType, records, 
fileGroupCount);
       metadataMetaClient.reloadActiveTimeline();
-      String partitionPath = partitionType == FUNCTIONAL_INDEX
-          ? dataWriteConfig.getFunctionalIndexConfig().getIndexName()
-          : partitionType.getPartitionPath();
+      String partitionPath = (partitionType == FUNCTIONAL_INDEX || 
partitionType == SECONDARY_INDEX) ? 
dataWriteConfig.getFunctionalIndexConfig().getIndexName() : 
partitionType.getPartitionPath();

Review Comment:
   Yeah, probably we can add some method like 
`MetadataPartitionType.getPartitionPath` to simplify the code.



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to