[refine](sort) remove VSortExecExprs wrapper class#62428
[refine](sort) remove VSortExecExprs wrapper class#62428HappenLee merged 4 commits intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
…titionSortSink ### What problem does this PR solve? Issue Number: N/A Problem Summary: In PartitionSortSinkOperatorX::prepare(), ordering expr contexts were incorrectly prepared using _child->row_desc() instead of _row_descriptor (output row descriptor). The ordering expressions contain slot IDs from the output row descriptor (which may reference a full scan tuple), not the projected child row descriptor. This caused "VSlotRef k1 have invalid slot id" errors for window functions with PARTITION BY. ### Release note None ### Check List (For Author) - Test: Regression test (test_window_function) - manually reproduced and verified fix - Behavior changed: No - Does this need documentation: No
|
run buildall |
|
/review |
|
No issues found in this review. Critical checkpoints:
Residual risk: review-only conclusion; no local build or test execution was performed. |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run nonConcurrent |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run nonConcurrent |
1 similar comment
|
run nonConcurrent |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
### What problem does this PR solve? #59207 #62428 Problem Summary: ### Release note None ### 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?
VSortExecExprswas a legacy wrapper class (ported from Impala) that heldVExprContextSPtrs _ordering_expr_ctxsalong with a dead_materialize_tuplebranch. Investigation showed that FE's
SortInfo.toThrift()never setssort_tuple_slot_exprsinTSortInfo, so_materialize_tupleis alwaysfalseand the materialization code path is unreachable dead code.This PR removes the
VSortExecExprsclass entirely and replaces all usageswith direct
VExprContextSPtrs.Changes
vsort_exec_exprs.handvsort_exec_exprs.cppVSortExecExprs&withconst VExprContextSPtrs&in all sorterconstructors (
FullSorter,TopNSorter,HeapSorter,PartitionSorter)sort_sink_operator,local_merge_sort_source_operator,exchange_source_operator,partition_sort_sink_operator,viceberg_sort_writerSorter::partial_sortandSorter::_prepare_sort_columnsRelease note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)