From 755757e57c3dc2029a0cd5a09f1b89ca73d493aa Mon Sep 17 00:00:00 2001 From: minghong Date: Sun, 12 May 2024 18:09:13 +0800 Subject: [PATCH] check pushDownContext validation after withNewProbeExpression() (#34704) (#34737) when the runtime filter target to a constant, the PushDownContext.finalTarget is null. in this case, do not pushdown runtime filter. example: select * from (select 1 as x from T1) T2 join T3 on T2.x=T3.x when push down RF(T3.x->T2.x) inside "select 1 as x from T1", the column x is a constant, and the pushDown stopped. (cherry picked from commit 7f06cf0a0125d84c41e1edbb71366e293f70239d) --- .../post/RuntimeFilterPushDownVisitor.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPushDownVisitor.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPushDownVisitor.java index f268d1ab8b..7cadbde176 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPushDownVisitor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPushDownVisitor.java @@ -103,9 +103,14 @@ public class RuntimeFilterPushDownVisitor extends PlanVisitorselect 0, 0 * push down context for "select 0, 0" is invalid */ - pushedDown |= setOperation.child(i).accept(this, ctx.withNewProbeExpression(newProbeExpr)); + pushedDown |= setOperation.child(i).accept(this, childPushDownContext); } } return pushedDown;