Commit 6bcd55e
authored
[Chore](sort) remove SortingQueueStrategy::Default (#59279)
### 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 -->1 parent d102aee commit 6bcd55e
1 file changed
+17
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | 254 | | |
257 | | - | |
258 | | - | |
| 255 | + | |
| 256 | + | |
259 | 257 | | |
260 | | - | |
| 258 | + | |
261 | 259 | | |
262 | 260 | | |
263 | | - | |
| 261 | + | |
264 | 262 | | |
265 | 263 | | |
266 | 264 | | |
| |||
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 271 | + | |
| 272 | + | |
277 | 273 | | |
278 | 274 | | |
279 | 275 | | |
280 | 276 | | |
281 | 277 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 278 | + | |
293 | 279 | | |
294 | 280 | | |
295 | 281 | | |
296 | 282 | | |
297 | 283 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
| 284 | + | |
314 | 285 | | |
315 | 286 | | |
316 | 287 | | |
| |||
334 | 305 | | |
335 | 306 | | |
336 | 307 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
343 | 312 | | |
344 | 313 | | |
345 | 314 | | |
| |||
348 | 317 | | |
349 | 318 | | |
350 | 319 | | |
351 | | - | |
352 | | - | |
353 | | - | |
| 320 | + | |
354 | 321 | | |
355 | 322 | | |
356 | 323 | | |
| |||
390 | 357 | | |
391 | 358 | | |
392 | 359 | | |
393 | | - | |
394 | | - | |
395 | | - | |
| 360 | + | |
396 | 361 | | |
397 | 362 | | |
398 | 363 | | |
| |||
424 | 389 | | |
425 | 390 | | |
426 | 391 | | |
427 | | - | |
428 | | - | |
429 | | - | |
| 392 | + | |
430 | 393 | | |
431 | 394 | | |
432 | 395 | | |
| |||
471 | 434 | | |
472 | 435 | | |
473 | 436 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
| 437 | + | |
478 | 438 | | |
479 | 439 | | |
0 commit comments