Gabriel39 commented on code in PR #27829:
URL: https://github.com/apache/doris/pull/27829#discussion_r1420112799


##########
be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp:
##########
@@ -530,31 +585,18 @@ Status PipelineXFragmentContext::_build_pipeline_tasks(
          * and JoinProbeOperator2.
          */
 
-        // First, set up the parent profile,
-        // then prepare the task profile and add it to 
operator_id_to_task_profile.
-        std::vector<RuntimeProfile*> operator_id_to_task_profile(
-                max_operator_id(), _runtime_states[i]->runtime_profile());
-        auto prepare_and_set_parent_profile = [&](PipelineXTask* task) {
-            auto sink = task->sink();
-            const auto& dests_id = sink->dests_id();
-            int dest_id = dests_id.front();
-            DCHECK(dest_id < operator_id_to_task_profile.size());
-            task->set_parent_profile(operator_id_to_task_profile[dest_id]);
-
-            RETURN_IF_ERROR(task->prepare(_runtime_states[i].get(), 
local_params,
-                                          request.fragment.output_sink));
+        // First, set up the parent profile,task runtime state
 
-            for (auto o : task->operatorXs()) {
-                int id = o->operator_id();
-                DCHECK(id < operator_id_to_task_profile.size());
-                auto* op_local_state = 
_runtime_states[i].get()->get_local_state(o->operator_id());
-                operator_id_to_task_profile[id] = op_local_state->profile();
-            }
+        auto prepare_and_set_parent_profile = [&](PipelineXTask* task, size_t 
pip_idx) {
+            DCHECK(pipeline_id_to_profile[pip_idx]);
+            task->set_parent_profile(pipeline_id_to_profile[pip_idx].get());

Review Comment:
   do not set



-- 
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