This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch 2.1-tmp in repository https://gitbox.apache.org/repos/asf/doris.git
commit e6e2099256f14a54364a85c5d3bbfda4bcbb70e8 Author: TengJianPing <[email protected]> AuthorDate: Sun Apr 7 14:07:06 2024 +0800 [fix](spill) fix hash join error 'invalid slot id' (#33273) --- .../exec/partitioned_hash_join_probe_operator.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp b/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp index 1a05b78b052..0c74834ab61 100644 --- a/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp +++ b/be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp @@ -494,27 +494,26 @@ Status PartitionedHashJoinProbeOperatorX::init(const TPlanNode& tnode, RuntimeSt return _probe_operator->init(tnode_, state); } Status PartitionedHashJoinProbeOperatorX::prepare(RuntimeState* state) { - // here do NOT call `OperatorXBase::prepare(state)` - // RETURN_IF_ERROR(OperatorXBase::prepare(state)); - for (auto& conjunct : _conjuncts) { - RETURN_IF_ERROR(conjunct->prepare(state, intermediate_row_desc())); - } - - RETURN_IF_ERROR(vectorized::VExpr::prepare(_projections, state, intermediate_row_desc())); - RETURN_IF_ERROR(vectorized::VExpr::prepare(_output_expr_ctxs, state, *_intermediate_row_desc)); - RETURN_IF_ERROR(_probe_operator->set_child(_child_x)); + // to avoid prepare _child_x twice + auto child_x = std::move(_child_x); + RETURN_IF_ERROR(JoinProbeOperatorX::prepare(state)); + RETURN_IF_ERROR(_probe_operator->set_child(child_x)); DCHECK(_build_side_child != nullptr); _probe_operator->set_build_side_child(_build_side_child); RETURN_IF_ERROR(_sink_operator->set_child(_build_side_child)); RETURN_IF_ERROR(_probe_operator->prepare(state)); RETURN_IF_ERROR(_sink_operator->prepare(state)); + _child_x = std::move(child_x); return Status::OK(); } Status PartitionedHashJoinProbeOperatorX::open(RuntimeState* state) { + // to avoid open _child_x twice + auto child_x = std::move(_child_x); RETURN_IF_ERROR(JoinProbeOperatorX::open(state)); RETURN_IF_ERROR(_probe_operator->open(state)); RETURN_IF_ERROR(_sink_operator->open(state)); + _child_x = std::move(child_x); return Status::OK(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
