You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/10/26 09:45:09 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #6016: [HUDI-4465] Optimizing file-listing sequence of Metadata Table

xushiyan commented on code in PR #6016:
URL: https://github.com/apache/hudi/pull/6016#discussion_r1005459420


##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -172,14 +174,19 @@ public int getFileSlicesCount() {
         .mapToInt(List::size).sum();
   }
 
+  @Override
+  public void close() throws Exception {
+    resetTableMetadata(null);
+  }
+
   protected List<PartitionPath> getAllQueryPartitionPaths() {
     List<String> queryRelativePartitionPaths = queryPaths.stream()
-        .map(path -> FSUtils.getRelativePartitionPath(new Path(basePath), path))
+        .map(path -> FSUtils.getRelativePartitionPath(basePath, path))
         .collect(Collectors.toList());
 
     // Load all the partition path from the basePath, and filter by the query partition path.
     // TODO load files from the queryRelativePartitionPaths directly.
-    List<String> matchedPartitionPaths = FSUtils.getAllPartitionPaths(engineContext, metadataConfig, basePath)
+    List<String> matchedPartitionPaths = getAllPartitionPathsUnchecked()

Review Comment:
   this change affects the tables which do not have both 1) `hoodie.table.partition.fields` in table config, and 2) metadata disabled. A partitioned table under these 2 conditions will be deemed as non-partitioned table, and resulted in not loading any records.



-- 
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-unsubscribe@hudi.apache.org

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