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/12/02 20:36:39 UTC
[GitHub] [hudi] vamshigv commented on a diff in pull request #7360: [MINOR] Fix Out of Bounds Exception for DayBasedCompactionStrategy
vamshigv commented on code in PR #7360:
URL: https://github.com/apache/hudi/pull/7360#discussion_r1038512488
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/compact/strategy/DayBasedCompactionStrategy.java:
##########
@@ -78,7 +78,8 @@ public List<HoodieCompactionOperation> orderAndFilter(HoodieWriteConfig writeCon
public List<String> filterPartitionPaths(HoodieWriteConfig writeConfig, List<String> allPartitionPaths) {
return allPartitionPaths.stream().map(partition -> partition.replace("/", "-"))
.sorted(Comparator.reverseOrder()).map(partitionPath -> partitionPath.replace("-", "/"))
- .collect(Collectors.toList()).subList(0, writeConfig.getTargetPartitionsPerDayBasedCompaction());
+ .collect(Collectors.toList()).subList(0, Math.min(allPartitionPaths.size(),
Review Comment:
Seemingly very unrelated and couldn't reproduce locally. Will trigger again
--
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