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


##########
be/src/exec/pipeline/pipeline_fragment_context.cpp:
##########
@@ -1067,8 +1067,11 @@ Status 
PipelineFragmentContext::_create_data_sink(ObjectPool* pool, const TDataS
             return Status::InternalError("Missing data buffer sink.");
         }
 
-        _sink = std::make_shared<ResultSinkOperatorX>(next_sink_operator_id(), 
row_desc,
-                                                      output_exprs, 
thrift_sink.result_sink);
+        auto& pipeline = _pipelines[cur_pipeline_id];
+        int child_node_id = pipeline->operators().back()->node_id();
+        _sink = std::make_shared<ResultSinkOperatorX>(next_sink_operator_id(), 
child_node_id + 1,

Review Comment:
   "`ResultSink` already has a canonical FE-side id: FE constructs it with 
`planFragment.getPlanRoot().getId()` (`PlanFragment.finalize()` / 
`PhysicalPlanTranslator.visitPhysicalResultSink()`). In this pipeline, 
`operators().back()->node_id()` is that same root id. Adding `+ 1` keeps the 
sink profile id incorrect, just with a different wrong value. This path should 
use the child/root node id directly if the goal is to match the FE sink id 
shown in profile/explain output."



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to