YuweiXiao commented on code in PR #6680:
URL: https://github.com/apache/hudi/pull/6680#discussion_r980881190


##########
hudi-common/src/main/java/org/apache/hudi/metadata/FileSystemBackedTableMetadata.java:
##########
@@ -74,8 +75,13 @@ public List<String> getAllPartitionPaths() throws 
IOException {
       return FSUtils.getAllPartitionFoldersThreeLevelsDown(fs, 
datasetBasePath);
     }
 
+    return getPartitionPathsWithPrefix("");
+  }
+
+  @Override
+  public List<String> getPartitionPathsWithPrefix(String prefix) throws 
IOException {
     List<Path> pathsToList = new CopyOnWriteArrayList<>();
-    pathsToList.add(basePath);
+    pathsToList.add(StringUtils.isNullOrEmpty(prefix) ? new 
Path(datasetBasePath) : new Path(datasetBasePath, prefix));

Review Comment:
   Actually, it could be a prefix of the name of the folder, e.g., 
prefix=`year=1992`, and the actual structure is `year=1992/month=xx/day=xx`.
   
   The reason I added a check here (i.e., Empty check) is that the Path 
constructor cannot handle empty "" input for its second parameter.



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