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 db3ba02993 [fix](planner) Fix an issue where outputSmap's size  could 
grow exponentially (#11378)
db3ba02993 is described below

commit db3ba02993883d5cb2bf2e48c52d6197152d8e08
Author: Mingyu Chen <[email protected]>
AuthorDate: Wed Aug 3 09:07:00 2022 +0800

    [fix](planner) Fix an issue where outputSmap's size  could grow 
exponentially (#11378)
    
    * [fix](planner) Fix an issue where outputSmap'size  could grow 
exponentially
---
 .../java/org/apache/doris/analysis/ExprSubstitutionMap.java    | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
index 40c44b5bd0..41308bdb63 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
@@ -25,8 +25,8 @@ import org.apache.doris.common.AnalysisException;
 import com.google.common.base.Joiner;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.util.List;
 
@@ -39,7 +39,7 @@ import java.util.List;
  * See Expr.substitute() and related functions for details on the actual 
substitution.
  */
 public final class ExprSubstitutionMap {
-    private static final Logger LOG = 
LoggerFactory.getLogger(ExprSubstitutionMap.class);
+    private static final Logger LOG = 
LogManager.getLogger(ExprSubstitutionMap.class);
 
     private boolean checkAnalyzed = true;
     private List<Expr> lhs; // left-hand side
@@ -209,7 +209,9 @@ public final class ExprSubstitutionMap {
                 Expr fRhs = f.getRhs().get(j);
                 if (fRhs.contains(gLhs)) {
                     Expr newRhs = fRhs.trySubstitute(g, analyzer, false);
-                    result.put(f.getLhs().get(j), newRhs);
+                    if (!result.containsMappingFor(f.getLhs().get(j))) {
+                        result.put(f.getLhs().get(j), newRhs);
+                    }
                     findGMatch = true;
                 }
             }


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

Reply via email to