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

   ### Background
   
   Doris can absorb a key-column predicate into an exact scan key. Segment zone 
map pruning evaluates the column predicates that remain, while the segment 
iterator later uses the scan key to locate rows.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: #60484 (removes redundant key predicates)
   PR Type: Performance
   
   Problem Summary:
   
   When a leading key column still has a column predicate, segment pruning can 
also use its scan range to reject segments before exact seek.
   
   ### Details
   
   - **Why it was slow:** Segment-level pruning only tested the remaining 
column predicates, so the iterator could still perform a seek on an 
out-of-range segment.
   - **Optimization:** Convert a supported single integer key range into 
comparisons and append them to a temporary AND group for the same column. 
Evaluate the group in one zone map check.
   - **Results:** Performance has not been measured.
   - **Applicability and cost:** Applies to columns already visited by the 
segment zone map loop. Eligible checks construct a temporary predicate group.
   
   ### Testing
   
   - `./build.sh --be -j48` passed with ASAN on the development host.
   - Clang-format 16 and BE header hygiene checks passed for the patch.
   - Added 
`SegmentIteratorExprZonemapTest.NewIteratorMergesKeyRangeWithColumnPredicates` 
to cover open and closed boundaries and preservation of the original predicate 
group. Execution is pending.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No
   - Does this need documentation: No
   - Pre-submission status: Partially verified. TeamCity results pending.
   
   ### AI Disclosure
   
   - Tool: OpenAI Codex
   - Generated: BE code, focused unit test, and description
   - Human review: The author reviewed the proposed merge approach. Code review 
is pending.
   


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