-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Chore](sort) remove SortingQueueStrategy::Default #59279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
mrhhsg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
### What problem does this PR solve?
This pull request refactors the sorting queue implementation in
`be/src/vec/core/sort_cursor.h` to simplify the codebase by removing the
`SortingQueueStrategy` enum and the related template specialization
logic. The new approach introduces a dedicated `SortingQueueBatch`
class, streamlining the sorting queue logic and reducing code
complexity.
**Refactoring and simplification of sorting queue logic:**
* Removed the `SortingQueueStrategy` enum and the `SortingQueueImpl`
template specialization, replacing them with a single
`SortingQueueBatch` class that handles batch sorting logic directly.
* Consolidated the `current()` and `next()` methods to remove
conditional compilation and strategy checks, simplifying their
interfaces for batch processing.
* Removed unnecessary `if constexpr` blocks and strategy-dependent code,
making batch size updates unconditional where appropriate.
[[1]](diffhunk://#diff-6e09b43a2f90fe07546a69275b5e29af2e1f35e86be173b662b12192996b54f7L337-L354)
[[2]](diffhunk://#diff-6e09b43a2f90fe07546a69275b5e29af2e1f35e86be173b662b12192996b54f7L393-L395)
[[3]](diffhunk://#diff-6e09b43a2f90fe07546a69275b5e29af2e1f35e86be173b662b12192996b54f7L427-L430)
* Updated type aliases to remove references to the old
`SortingQueueImpl` and strategy-based specializations, leaving only the
new `SortingQueueBatch`.
**Minor cleanup:**
* Removed redundant default initialization of `_block_supplier` in
`BlockSupplierSortCursorImpl`.
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
What problem does this PR solve?
This pull request refactors the sorting queue implementation in
be/src/vec/core/sort_cursor.hto simplify the codebase by removing theSortingQueueStrategyenum and the related template specialization logic. The new approach introduces a dedicatedSortingQueueBatchclass, streamlining the sorting queue logic and reducing code complexity.Refactoring and simplification of sorting queue logic:
SortingQueueStrategyenum and theSortingQueueImpltemplate specialization, replacing them with a singleSortingQueueBatchclass that handles batch sorting logic directly.current()andnext()methods to remove conditional compilation and strategy checks, simplifying their interfaces for batch processing.if constexprblocks and strategy-dependent code, making batch size updates unconditional where appropriate. [1] [2] [3]SortingQueueImpland strategy-based specializations, leaving only the newSortingQueueBatch.Minor cleanup:
_block_supplierinBlockSupplierSortCursorImpl.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)