onlywangyh commented on code in PR #7323:
URL: https://github.com/apache/hudi/pull/7323#discussion_r1035646763
##########
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:
I have changed this condition try to covering all production scenarios. This
method we want get all matchedPartitionPaths
When this partition is "/year=2022/month=08/day=30", the query relative
partition path prefixes may be these value :
1、a empty path like "". In this scenarios we should filter all paths return
as matched path
2、a prefixes partition path like "/year=2022";
3、a absolute path like "/year=2022/month=08/day=30"
If prefixes is empty ,
--
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]