This is an automated email from the ASF dual-hosted git repository.

yiguolei 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 540132f656b [fix](profilev2) fix merge profile min is zero #27524
540132f656b is described below

commit 540132f656b756a929e14617f21f9e6973925836
Author: Mryange <[email protected]>
AuthorDate: Fri Nov 24 14:11:11 2023 +0800

    [fix](profilev2) fix merge profile min is zero #27524
---
 .../src/main/java/org/apache/doris/common/util/RuntimeProfile.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 35ff607acc7..432171e9ce2 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
@@ -493,7 +493,8 @@ public class RuntimeProfile {
             Counter counter = templateProfile.counterMap.get(childCounterName);
             mergeCounters(childCounterName, profiles, simpleProfile);
             if (counter.getLevel() == 1) {
-                AggCounter aggCounter = new 
AggCounter(profiles.get(0).counterMap.get(childCounterName).getType(), 0);
+                Counter oldCounter = 
profiles.get(0).counterMap.get(childCounterName);
+                AggCounter aggCounter = new AggCounter(oldCounter.getType(), 
oldCounter.getValue());
                 for (RuntimeProfile profile : profiles) {
                     Counter orgCounter = 
profile.counterMap.get(childCounterName);
                     aggCounter.addCounter(orgCounter);


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

Reply via email to