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

jakevin 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 958aee38e9 [fix](Nereids): fix Master Bors problem. (#16794)
958aee38e9 is described below

commit 958aee38e98aa28bcbfec59af01f182aa96db291
Author: jakevin <jakevin...@gmail.com>
AuthorDate: Thu Feb 16 01:53:53 2023 +0800

    [fix](Nereids): fix Master Bors problem. (#16794)
---
 .../rules/rewrite/logical/EliminateOuterJoin.java       |  6 +++---
 .../main/java/org/apache/doris/nereids/util/Utils.java  | 17 +++--------------
 2 files changed, 6 insertions(+), 17 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/EliminateOuterJoin.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/EliminateOuterJoin.java
index c20ed90482..33fe48fe61 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/EliminateOuterJoin.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/logical/EliminateOuterJoin.java
@@ -25,8 +25,8 @@ import org.apache.doris.nereids.trees.expressions.Slot;
 import org.apache.doris.nereids.trees.plans.GroupPlan;
 import org.apache.doris.nereids.trees.plans.JoinType;
 import org.apache.doris.nereids.trees.plans.logical.LogicalJoin;
-import org.apache.doris.nereids.util.ExpressionUtils;
 import org.apache.doris.nereids.util.TypeUtils;
+import org.apache.doris.nereids.util.Utils;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableSet.Builder;
@@ -57,8 +57,8 @@ public class EliminateOuterJoin extends OneRewriteRuleFactory 
{
                     conjunctsBuilder.add(predicate);
                 }
             }
-            boolean canFilterLeftNull = 
ExpressionUtils.isIntersecting(join.left().getOutputSet(), notNullSlots);
-            boolean canFilterRightNull = 
ExpressionUtils.isIntersecting(join.right().getOutputSet(), notNullSlots);
+            boolean canFilterLeftNull = 
Utils.isIntersecting(join.left().getOutputSet(), notNullSlots);
+            boolean canFilterRightNull = 
Utils.isIntersecting(join.right().getOutputSet(), notNullSlots);
             if (!canFilterRightNull && !canFilterLeftNull) {
                 return null;
             }
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java
index 512a2147e2..a5989d595f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/Utils.java
@@ -28,6 +28,7 @@ import com.google.common.collect.ImmutableList;
 import org.apache.commons.lang3.StringUtils;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -82,19 +83,7 @@ public class Utils {
     /**
      * Check whether lhs and rhs are intersecting.
      */
-    public static <T> boolean isIntersecting(Set<T> lhs, List<T> rhs) {
-        for (T rh : rhs) {
-            if (lhs.contains(rh)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Check whether lhs and rhs are intersecting.
-     */
-    public static <T> boolean isIntersecting(Set<T> lhs, Set<T> rhs) {
+    public static <T> boolean isIntersecting(Set<T> lhs, Collection<T> rhs) {
         for (T rh : rhs) {
             if (lhs.contains(rh)) {
                 return true;
@@ -111,7 +100,7 @@ public class Utils {
     }
 
     /**
-     * Wrapper to a funciton with return value.
+     * Wrapper to a function with return value.
      */
     public interface Supplier<R> {
         R get() throws Exception;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to