From 1b1e2e8a292c368b51ed5b8ea2c2a426437d2832 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:34:38 +0800 Subject: [PATCH] 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 --- .../apache/doris/common/util/RuntimeProfile.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java index 372b84fa3f7826..ab5fec3413f981 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/RuntimeProfile.java @@ -654,8 +654,17 @@ public void addChildWithCheck(RuntimeProfile child, Map planNod 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) {