[fix](nereids) patition prune is affected by non-paritition-key condition (#26873)

stop propagate Context.childrenContainsNonInterestedSlots if expr changed to TRUE
This commit is contained in:
minghong
2023-11-15 14:46:59 +08:00
committed by GitHub
parent 5dbc3cbba4
commit a1d139080d
2 changed files with 61 additions and 1 deletions

View File

@ -109,7 +109,9 @@ public class TryEliminateUninterestedPredicates extends DefaultExpressionRewrite
public Expression visitAnd(And and, Context parentContext) {
Expression left = and.left();
Context leftContext = new Context();
Expression newLeft = this.visit(left, leftContext);
// Expression newLeft = this.visit(left, leftContext);
Expression newLeft = left.accept(this, leftContext);
if (leftContext.childrenContainsNonInterestedSlots) {
newLeft = BooleanLiteral.TRUE;
}