diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPrunerForExternalTable.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPrunerForExternalTable.java index 0a0cfe04ec6064..9e1082b76e34c2 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPrunerForExternalTable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPrunerForExternalTable.java @@ -24,6 +24,7 @@ import org.apache.doris.nereids.trees.plans.physical.AbstractPhysicalJoin; import org.apache.doris.nereids.trees.plans.physical.PhysicalFileScan; import org.apache.doris.nereids.trees.plans.physical.PhysicalHashJoin; +import org.apache.doris.nereids.trees.plans.physical.PhysicalNestedLoopJoin; import org.apache.doris.nereids.trees.plans.physical.PhysicalRelation; import org.apache.doris.nereids.trees.plans.physical.RuntimeFilter; import org.apache.doris.nereids.util.MutableState; @@ -104,6 +105,20 @@ public PhysicalHashJoin visitPhysicalHashJoin(PhysicalHashJoin join, + CascadesContext context) { + join.right().accept(this, context); + join.right().setMutableState(MutableState.KEY_PARENT, join); + // nested loop join is slow, so jump add 2 + join.setMutableState(MutableState.KEY_RF_JUMP, + (Integer) join.right().getMutableState(MutableState.KEY_RF_JUMP).get() + 2); + join.left().accept(this, context); + join.left().setMutableState(MutableState.KEY_PARENT, join); + return join; + } + private List getAncestors(Plan plan) { List ancestors = Lists.newArrayList(); ancestors.add(plan);