cshuo commented on code in PR #19984:
URL: https://github.com/apache/hudi/pull/19984#discussion_r4068263267
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/lsm/HoodieLsmFileGroupReader.java:
##########
@@ -142,10 +145,14 @@ private HoodieLsmFileGroupReader(
.sortOutputs(false)
.inflightInstantsAllowed(allowInflightInstants)
.build();
- // filter log files by instant range.
- if (logFiles != null && readerContext.getInstantRange().isPresent()) {
- InstantRange instantRange = readerContext.getInstantRange().get();
- logFiles = logFiles.filter(logFile ->
instantRange.isInRange(logFile.getDeltaCommitTime()));
Review Comment:
@danny0405 Time-travel queries select the latest file slice whose base
instant is at or before the as-of timestamp
(`getLatestMergedFileSlicesBeforeOrOn(queryInstant)`). The selected base file
is immutable and does not contain later updates, so no per-record filtering is
needed. Later log files in the slice must still be filtered.
Unlike time travel, incremental queries need InstantRange to filter records
in the base file by _hoodie_commit_time, returning only records updated within
the requested range.
--
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]