This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 01992458d86 [MINOR] Match the directory-filter-regex to the relative 
directory name (#8601)
01992458d86 is described below

commit 01992458d86034cbfca79a865d6ee47313fc585e
Author: Prashant Wason <[email protected]>
AuthorDate: Sat Apr 29 20:33:22 2023 -0700

    [MINOR] Match the directory-filter-regex to the relative directory name 
(#8601)
---
 .../apache/hudi/metadata/HoodieBackedTableMetadataWriter.java    | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git 
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
 
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
index df4d2530815..1f5f505364c 100644
--- 
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
+++ 
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
@@ -673,12 +673,9 @@ public abstract class HoodieBackedTableMetadataWriter 
implements HoodieTableMeta
       for (DirectoryInfo dirInfo : processedDirectories) {
         if (!dirFilterRegex.isEmpty()) {
           final String relativePath = dirInfo.getRelativePath();
-          if (!relativePath.isEmpty()) {
-            Path partitionPath = new Path(datasetBasePath, relativePath);
-            if (partitionPath.getName().matches(dirFilterRegex)) {
-              LOG.info("Ignoring directory " + partitionPath + " which matches 
the filter regex " + dirFilterRegex);
-              continue;
-            }
+          if (!relativePath.isEmpty() && relativePath.matches(dirFilterRegex)) 
{
+            LOG.info("Ignoring directory " + relativePath + " which matches 
the filter regex " + dirFilterRegex);
+            continue;
           }
         }
 

Reply via email to