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/11/29 11:57:37 UTC

[GitHub] [hudi] codope commented on a diff in pull request #7323: [HUDI-5276] Exclude unnecessary partiton paths return

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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -146,7 +146,7 @@ protected Option<HoodieRecord<HoodieMetadataPayload>> getRecordByKey(String key,
   @Override
   public List<String> getPartitionPathsWithPrefixes(List<String> prefixes) throws IOException {
     return getAllPartitionPaths().stream()
-        .filter(p -> prefixes.stream().anyMatch(p::startsWith))
+        .filter(p -> prefixes.stream().anyMatch(queryPaths -> p.startsWith(queryPaths + "/") || queryPaths.equals(p)))

Review Comment:
   This alters the condition by assuming things such as "/" will be separator and it will be present. Such conditions may not be true for many production scenarios. I think we should not change the condition here. This method is just meant to check for prefixes.



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