danny0405 commented on code in PR #17770:
URL: https://github.com/apache/hudi/pull/17770#discussion_r2670698582
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v2/ArchivedTimelineV2.java:
##########
@@ -268,11 +263,16 @@ private List<HoodieInstant>
loadInstants(HoodieArchivedTimeline.TimeRangeFilter
private List<HoodieInstant> loadInstants(
HoodieArchivedTimeline.TimeRangeFilter filter,
HoodieArchivedTimeline.LoadMode loadMode,
- Function<GenericRecord, Boolean> commitsFilter) {
+ Function<GenericRecord, Boolean> commitsFilter,
+ Option<Integer> limit) {
Map<String, HoodieInstant> instantsInRange = new ConcurrentHashMap<>();
Option<BiConsumer<String, GenericRecord>> instantDetailsConsumer =
Option.ofNullable(getInstantDetailsFunc(loadMode));
timelineLoader.loadInstants(metaClient, filter, loadMode, commitsFilter,
- (instantTime, avroRecord) -> instantsInRange.putIfAbsent(instantTime,
readCommit(instantTime, avroRecord, instantDetailsConsumer)), Option.empty());
+ (instantTime, avroRecord) -> {
+ if (filter == null || filter.isInRange(instantTime)) {
Review Comment:
we might need to fix the `ArchivedTimelineV1` instants loading for
additional instants filtering too.
--
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]