Mryange opened a new pull request, #63429:
URL: https://github.com/apache/doris/pull/63429
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: `MergeSorterState` used the generic copy-based merge path
even when the current top sorted run could return its whole remaining block
before any other run. This adds a direct whole-block fast path guarded by a
total-order check, avoiding unnecessary `insert_range_from` work in inner merge.
### What is changed?
- Add `MergeSortCursor::totally_less_or_equals()` to detect when the current
run is wholly before the next child.
- Return the current block directly from
`MergeSorterState::_merge_sort_read_impl()` when the whole-block condition is
satisfied.
- Add focused BE unit tests for exact-batch and smaller-than-batch
whole-block fast-path cases.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- BE UT: `sh run-be-ut.sh --run --filter='MergeSorterStateTest.*'`
- Behavior changed: No
- Does this need documentation: No
--
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]