This is an automated email from the ASF dual-hosted git repository. zhangstar333 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 122b22f673a [fix](profile) only printed for non-sink nodes in the merge profile. (#44040) 122b22f673a is described below commit 122b22f673a6b29c4a170fbd3b30240702244ebe Author: Mryange <yanxuech...@selectdb.com> AuthorDate: Mon Nov 18 15:27:13 2024 +0800 [fix](profile) only printed for non-sink nodes in the merge profile. (#44040) ### What problem does this PR solve? In the past, the result sink did not have a plan node ID, which led to incorrect plan info being output. Now, the plan info for sinks is not printed. before ``` MergedProfile Fragments: Fragment 0: Pipeline : 0(instance_num=1): - WaitWorkerTime: avg 30.984us, max 30.984us, min 30.984us RESULT_SINK_OPERATOR (id=0): - PlanInfo - TABLE: test.big_string_table(big_string_table), PREAGGREGATION: ON - partitions=1/1 (big_string_table) - tablets=3/3, tabletList=113264,113266,113268 - cardinality=131072, avgRowSize=13.638229, numNodes=1 - pushAggOp=COUNT - projections: 1 - project output tuple id: 1 OLAP_SCAN_OPERATOR (id=0. nereids_id=156. table name = big_string_table(big_string_table)): ``` now ``` MergedProfile Fragments: Fragment 0: Pipeline : 0(instance_num=1): - WaitWorkerTime: avg 32.576us, max 32.576us, min 32.576us RESULT_SINK_OPERATOR (id=0): OLAP_SCAN_OPERATOR (id=0. nereids_id=156. table name = big_string_table(big_string_table)): - PlanInfo - TABLE: test.big_string_table(big_string_table), PREAGGREGATION: ON - partitions=1/1 (big_string_table) - tablets=3/3, tabletList=113264,113266,113268 - cardinality=131072, avgRowSize=0.0, numNodes=1 - pushAggOp=COUNT - projections: 1 - project output tuple id: 1 ``` --- .../java/org/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 3ffc303a6db..19082959034 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 @@ -682,8 +682,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) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org