github-actions[bot] commented on code in PR #33273:
URL: https://github.com/apache/doris/pull/33273#discussion_r1554523234


##########
be/src/pipeline/exec/partitioned_hash_join_probe_operator.cpp:
##########
@@ -494,27 +494,35 @@ 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();
+}
+
+Status PartitionedHashJoinProbeOperatorX::close(RuntimeState* state) {

Review Comment:
   warning: method 'close' can be made static 
[readability-convert-member-functions-to-static]
   
   be/src/pipeline/exec/partitioned_hash_join_probe_operator.h:155:
   ```diff
   -     Status close(RuntimeState* state) override;
   +     static Status close(RuntimeState* state) override;
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to