fhan688 opened a new pull request, #19553:
URL: https://github.com/apache/hudi/pull/19553

   ### Describe the issue this Pull Request addresses
   
   
     This is a follow-up to #19338 and addresses the archived-timeline 
optimization suggested in 
https://github.com/apache/hudi/pull/19338#issuecomment-5211158987.
   
     For timeline layout V1, `CompletionTimeQueryViewV1` loaded archived 
instants to identify candidate requested times, after which 
`IncrementalQueryAnalyzer` discarded that timeline and loaded the archive again 
to construct `QueryContext`. Since V1 completion time is equivalent to 
requested time, the second scan is redundant.
   
     ### Summary and Changelog
   
     - Add a dedicated V1 analysis path in `IncrementalQueryAnalyzer`.
     - Load the filtered archived timeline at most once when the requested 
range overlaps archived instants.
     - Apply `InstantRange` directly to `HoodieInstant.requestedTime()` and 
reuse the same archived timeline in `QueryContext`.
     - Avoid archive loading for active-only and snapshot ranges; for end-only 
ranges, check the filtered active timeline before loading the archive.
     - Keep the V2 completion-time query path unchanged.
     - Add tests covering single archive loading, timeline reuse, range 
boundaries, active-only and snapshot paths, limits, and V2 behavior.
   
     ### Impact
   
     Improves incremental-query performance for timeline layout V1 (table 
versions 5–7) by eliminating a redundant archived-timeline scan. There are no 
public API, configuration, storage-format, or V2 semantic changes. Query 
results and existing range semantics remain unchanged.
   
     ### Risk Level
   
     low
   
     The change touches V1 incremental range selection but keeps V2 on the 
existing path. It is covered by `TestIncrementalQueryAnalyzer` and 
`TestCompletionTimeQueryViewV1`: 16 tests passed with no failures or errors. 
Reactor compilation, Checkstyle, RAT, and `git diff --check` also passed.
   
     ### Documentation Update
   
     none. This is an internal performance optimization with no new user-facing 
behavior or configuration.
   
     ### Contributor's checklist
   
     - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
     - [x] Enough context is provided in the sections above
     - [x] Adequate tests were added if applicable


-- 
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