bhat-vinay commented on code in PR #10860:
URL: https://github.com/apache/hudi/pull/10860#discussion_r1552836822


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -434,7 +433,12 @@ private boolean initializeFromFilesystem(String 
initializationTime, List<Metadat
             fileGroupCountAndRecordsPair = initializeRecordIndexPartition();
             break;
           case FUNCTIONAL_INDEX:
-            fileGroupCountAndRecordsPair = 
initializeFunctionalIndexPartition();
+            Set<String> functionalIndexPartitionsToInit = 
getFunctionalIndexPartitionsToInit();
+            if (functionalIndexPartitionsToInit.isEmpty()) {
+              continue;

Review Comment:
   @danny0405 `MetadataPartitionType` has an inherent assumption that it maps 
directly to the physical partition (or rather partition path) for metadata 
table. While it is true for most of the MDT partitions, it is not the case with 
functional-index partitions (and the upcoming secondary index partition). 
`MetadataPartitionType` will only have a single entry for functional-index, 
`func_index_`, which acts as the prefix of the actual physical partition. The 
actual physical partitions is manifested as `func_index_<index-name>`. This is 
what the PR is trying to fix.



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