Mryange opened a new pull request, #69429:
URL: https://github.com/apache/doris/pull/69429

   ### 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)
   
   - Test:
       - [ ] Regression test
       - [ ] Unit Test
       - [x] Manual test (add detailed scripts or steps below)
           - Static checks only: clang-format 16 and `git diff --check` passed.
           - Build, unit tests, and SQL regression tests have not been run for 
this 4.2 backport.
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Duplicate and out-of-order rowids are normalized before 
storage reads; output order and duplicates are preserved.
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to