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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to