Skip to content

Commit

Permalink
fix p0 again
Browse files Browse the repository at this point in the history
  • Loading branch information
LiBinfeng-01 committed Nov 5, 2024
1 parent f4952b4 commit 6164780
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public Rule build() {
}
}
}
for (Expression predicate : predicates) {
predicate.setInferNotNull(true);
}
Set<Expression> needGenerateNotNulls = needGenerateNotNullsBuilder.build();
if (needGenerateNotNulls.isEmpty()) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public Rule build() {
needGenerateNotNullsBuilder.add(((Not) isNotNull).withGeneratedIsNotNull(true));
}
}
for (Expression predicate : predicates) {
predicate.setInferNotNull(true);
}
Set<Expression> needGenerateNotNulls = needGenerateNotNullsBuilder.build();
if (needGenerateNotNulls.isEmpty()) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public Rule build() {
conjuncts, join.right().getOutputSet(), ctx.cascadesContext);
right = PlanUtils.filterOrSelf(rightNotNull, join.right());
}
for (Expression conjunct : conjuncts) {
conjunct.setInferNotNull(true);
}

if (left.equals(join.left()) && right.equals(join.right())) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ public static Set<Slot> inferNotNullSlots(Set<Expression> predicates, CascadesCo
new ExpressionRewriteContext(cascadesContext)
);
if (evalExpr.isNullLiteral() || BooleanLiteral.FALSE.equals(evalExpr)) {
predicate.setInferNotNull(true);
notNullSlots.add(slot);
}
}
Expand Down

0 comments on commit 6164780

Please sign in to comment.