Repository navigation
[fix](exec) Backport batched rowid reads for lazy materialization to 4.2 - #69429
Merged
Merged
Conversation
Backport apache#63436 via the branch-4.1 adaptation in apache#69331. Group requests by segment, sort and deduplicate rowids before batch reads, and scatter results back to preserve request order and duplicate rows. Preserve branch-4.2 COW ownership, Variant V2 handling, rowid range checks, file cache policy, and external row-fetch fixes. Adapt the existing Variant segment-reader test to the batch interface. Validation: clang-format 16 and git diff --check passed. Build, unit tests, and SQL regression tests were not run for this backport. (cherry picked from commit 12f02eb) (cherry picked from commit 3727196)
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
yiguolei
approved these changes
Oct 22, 2026
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
|
skip buildall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: N/A
Related PR: #63436, #69331
Problem Summary:
Backport #63436 to branch-4.2 using the branch-4.1 adaptation from #69331. TopN lazy materialization can hang when a join produces duplicate or out-of-order physical rowids. Root cause: reusing a column iterator for these requests can underflow the RLE decoder's unsigned skip count. Group requests by segment, sort and deduplicate rowids before batch reads, then scatter results back to preserve request order and duplicate rows.
The backport preserves branch-4.2 COW ownership, Variant V2 handling, rowid range checks, file cache policy, and existing external row-fetch fixes. The existing Variant segment-reader test is adapted to the batch interface. No additional prerequisite PRs are included.
Release note
Fix TopN lazy materialization hanging on duplicate or out-of-order rowids from joins.
Check List (For Author)
git diff --checkpassed.Check List (For Reviewer who merge this PR)