[fix](Nereids): OuterJoinAssoc reject literal condition (#31172)

This commit is contained in:
jakevin
2024-02-21 20:22:50 +08:00
committed by yiguolei
parent e183e9ac46
commit 2069f9ff63
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ public class OuterJoinAssoc extends OneExplorationRuleFactory {
.addAll(topJoin.getOtherJoinConjuncts()).build();
Set<Slot> notNullSlots = ExpressionUtils.inferNotNullSlots(on,
ctx.cascadesContext);
if (!conditionSlot.equals(notNullSlots)) {
if (conditionSlot.isEmpty() || !conditionSlot.equals(notNullSlots)) {
return null;
}
}

View File

@ -80,7 +80,7 @@ public class OuterJoinAssocProject extends OneExplorationRuleFactory {
.addAll(topJoin.getOtherJoinConjuncts()).build();
Set<Slot> notNullSlots = ExpressionUtils.inferNotNullSlots(on,
ctx.cascadesContext);
if (!conditionSlot.equals(notNullSlots)) {
if (conditionSlot.isEmpty() || !conditionSlot.equals(notNullSlots)) {
return null;
}
}