branch-2.1: [fix](profile) only printed for non-sink nodes in the merge profile. #44040 (#44252)

Cherry-picked from #44040

Co-authored-by: Mryange <yanxuecheng@selectdb.com>
This commit is contained in:
github-actions[bot]
2024-11-19 17:34:38 +08:00
committed by GitHub
parent 2eb66c2609
commit 1b1e2e8a29

View File

@ -654,8 +654,17 @@ public class RuntimeProfile {
if (planNodeMap == null || !planNodeMap.containsKey(child.nodeId())) {
return;
}
child.addPlanNodeInfos(planNodeMap.get(child.nodeId()));
planNodeMap.remove(child.nodeId());
/*
* The check for SINK_OPERATOR is performed because SINK_OPERATOR does not have
* a corresponding plan node ID.
* Currently, the plan node info is only printed for non-sink nodes in the merge
* profile.
*/
if (name.contains("_SINK_OPERATOR")) {
child.addPlanNodeInfos(planNodeMap.get(child.nodeId()));
planNodeMap.remove(child.nodeId());
}
}
public void addPlanNodeInfos(String infos) {