[fix](Nereids): fix Master Bors problem. (#16794)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user