codope commented on code in PR #8758:
URL: https://github.com/apache/hudi/pull/8758#discussion_r1232152667


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -408,18 +365,32 @@ private boolean initializeFromFilesystem(String 
initializationTime, List<Metadat
       LOG.info("Initializing MDT partition " + partitionType + " at instant " 
+ commitTimeForPartition);
 
       Pair<Integer, HoodieData<HoodieRecord>> fileGroupCountAndRecordsPair;
-      switch (partitionType) {
-        case FILES:
-          fileGroupCountAndRecordsPair = 
initializeFilesPartition(initializationTime, partitionInfoList);
-          break;
-        case BLOOM_FILTERS:
-          fileGroupCountAndRecordsPair = 
initializeBloomFiltersPartition(initializationTime, partitionToFilesMap);
-          break;
-        case COLUMN_STATS:
-          fileGroupCountAndRecordsPair = 
initializeColumnStatsPartition(partitionToFilesMap);
-          break;
-        default:
-          throw new HoodieMetadataException("Unsupported MDT partition type: " 
+ partitionType);
+      try {
+        switch (partitionType) {
+          case FILES:
+            fileGroupCountAndRecordsPair = 
initializeFilesPartition(partitionInfoList);
+            // initialize the metadata reader again so the FILES partition can 
be read
+            initMetadataReader();

Review Comment:
   This should be called in the end after setting table config because 
`HoodieBackedTableMetadata` checks for MDT init based on table config.



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