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 2023/01/18 04:06:42 UTC

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

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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -152,7 +153,8 @@ 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 ->

Review Comment:
   @onlywangyh this is not the right place to fix this -- this should be fixed on the caller side: if caller specifies prefix w/o a slash this method will match it appropriately. Instead, caller should have specified a path ending with a slash to signal that it doesn't want any other folders to be matched



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