[Refactor] Remove non-pipeline dead code from exec nodes#70133
Open
[Refactor] Remove non-pipeline dead code from exec nodes#70133
Conversation
Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove legacy non-pipeline code from execution nodes
[Refactor] Remove non-pipeline exec-only code from be/src/exec/*_node.cpp prepare/open/get_next
Mar 11, 2026
Remove stub prepare/open/get_next implementations and associated dead helper functions and member variables from nodes that inherit PipelineNode, which provides NotSupported defaults for these methods. Files changed: - hash_join_node: Remove stubs, _init_hash_table_param, and all dead helper methods (_has_null, _build, _probe, _probe_remain, _evaluate_build_keys, _calc_filter_for_other_conjunct, _process_*_conjunct, _push_down_in_filter, _do_publish_runtime_filters, _create_implicit_local_join_runtime_filters). Remove dead member variables and profiling counters. - cross_join_node: Remove dead helper methods (_get_next_probe_chunk, 6x _copy_* methods, get_next_internal, _init_row_desc, _build, _init_chunk) and associated member variables. - topn_node: Remove stubs and _consume_chunks with _sort_timer. - table_function_node: Remove stubs, build_chunk, get_next_input_chunk, and dead member variables (_fn_result_slots, _outer_slots, _param_slots, _input_chunk_ptr, _input_chunk_seek_rows, _outer_column_remain_repeat_times, _table_function_result, _table_function_exec_timer). - repeat_node: Remove stubs, extend_and_update_columns, and timer members. - select_node: Remove stubs and _conjunct_evaluate_timer. - aggregate_streaming_node: Remove stubs and _output_chunk_from_hash_map. - distinct_streaming_node: Remove stubs and _output_chunk_from_hash_set. - intersect_node: Remove stubs and comment block. - aggregate_base_node, aggregate_blocking_node, distinct_blocking_node: Remove stubs. - lookup_node, raw_values_node: Remove stubs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
Co-authored-by: stdpain <34912776+stdpain@users.noreply.github.com>
Copilot
AI
changed the title
[Refactor] Remove non-pipeline exec-only code from be/src/exec/*_node.cpp prepare/open/get_next
[Refactor] Introduce PipelineNode base class; remove non-pipeline dead code from exec nodes
Mar 11, 2026
Contributor
|
@copilot The PR description must strictly follow the project's GitHub PR template. |
Contributor
Author
Updated the PR description to follow the project template. |
trueeyu
previously approved these changes
Mar 11, 2026
Contributor
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
[BE Incremental Coverage Report]❌ fail : 13 / 21 (61.90%) file detail
|
trueeyu
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-pipeline
prepare/open/get_nextimplementations inbe/src/exec/*_node.cpphave been dead code since the pipeline engine became the sole execution path. This PR formalizes that by introducing aPipelineNodebase class and removing the dead code tree.Why I'm doing:
Non-pipeline
prepare/open/get_nextimplementations inbe/src/exec/*_node.cpphave been dead code since the pipeline engine became the sole execution path. Creating aPipelineNodebase class formalizes this and removes the dead code.What I'm doing:
Introduces
PipelineNode(be/src/exec/pipeline_node.h / pipeline_node.cpp) as an abstract base class betweenExecNodeand all pipeline-only nodes. It provides defaultNotSupportedimplementations forprepare,open, andget_next. Migrates 19 node classes to extendPipelineNodeand removes all dead non-pipeline helper functions and member variables (~1,580 lines removed).What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Original prompt
Goal
Remove legacy non-pipeline (exec-only) code paths from
be/src/exec/*_node.cppforprepare/open/get_next, keeping only the nodes that are still needed:*scan_nodeand*sinknodes.The request from the user: "remove no-pipeline code be/src/exec/*_node.cpp prepare/open/get_next. Note: only reserve *scan_node and *sink" and follow-up "exec-only".
Scope / Files
Primarily affects C++ backend execution nodes under:
be/src/exec/*_node.cppLikely includes (non-exhaustive):
be/src/exec/topn_node.cppbe/src/exec/fetch_node.cppbe/src/exec/lookup_node.cppbe/src/exec/select_node.cppbe/src/exec/repeat_node.cppbe/src/exec/analytic_node.cppbe/src/exec/exchange_node.cppbe/src/exec/union_node.cppbe/src/exec/except_node.cppbe/src/exec/project_node.cpp*_node.cppthat still contains exec-engine implementations inprepare/open/get_next.Nodes to keep exec-only implementations (do not remove their non-pipeline prepare/open/get_next):
*scan_node*(e.g.,olap_scan_node.cpp,file_scan_node.cpp, etc.)*sink*nodes (note: these may not be in*_node.cpp, but preserve any relevant sink classes if present).Expected Changes
For non-scan and non-sink nodes in
be/src/exec/*_node.cpp:prepare(),open(), andget_next().Status::NotSupported("...")with a clear message like "non-pipeline execution is removed"; ordecompose_to_pipeline) and keep no exec-engine logic.Ensure build succeeds:
Ensure runtime behavior is clear:
Add/adjust tests if the project has suitable unit/integration test coverage for plan execution selection.
Notes
.github/PULL_REQUEST_TEMPLATE.mdand the eventual PR description must strictly follow it.decompose_to_pipelineand pipeline operators).Acceptance Criteria
*_node.cppfiles no longer contain functional exec-only implementations inprepare/open/get_next.NotSupported/InternalErrorindicating non-pipeline execution has been removed.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: remove no-pipeline code be/src/exec/*_node.cpp prepare/open/get_next
Note: only reserve *scan_node and *sink
Assistant: I can do this, but I need one clarification before I start making code changes:
prepare/open/get_next) from all*_node.cpp(except*scan_node*and*sink*) and replace them with something likereturn Status::NotSupported("non-pipeline ...");, while keeping pipeline decomposition (decompose_to_pipeline) working, orif (!state->enable_pipeline_engine()) ...) but keep the methods otherwise functional?From a quick scan, the repo doesn’t literally use the string
"no-pipeline"in those files; it uses terms like “non-pipeline” (example:ConnectorScanNodecomment “for non-pipeline APIs”). citeturn1search0What I found so far (partial; GitHub search results are capped)
I located some
*_node.cppfiles underbe/src/exec/(this is not guaranteed complete due to search limits), including:be/src/exec/file_scan_node.cpp(SCAN — should be preserved)be/src/exec/topn_node.cppbe/src/exec/exchange_node.cppbe/src/exec/union_node.cppbe/src/exec/select_node.cppbe/src/exec/repeat_node.cppbe/src/exec/fetch_node.cppbe/src/exec/lookup_node.cppTo view/expand the list in GitHub UI, use a repo search like:
Scan/Sink exclusions you requested
file_scan_node.cpp(inheritsScanNode). citeturn2search0be/src/runtime/*sink*.cpp(e.g.result_sink.cpp) rather thanbe/src/exec/*_node.cpp. citeturn0search3Please confirm whether your “only reserve *sink” exception applies outside
be/src/exec/*_node.cpptoo (i.e., don’t touc...This pull request was created from Copilot chat.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.