Skip to content

Commit

Permalink
[tmp] the jump count of NLJ is 2 for runtime filter prune on external…
Browse files Browse the repository at this point in the history
… db (#29367)
  • Loading branch information
englefly authored Jan 1, 2024
1 parent 8a836be commit 895f1d4
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -104,6 +105,20 @@ public PhysicalHashJoin visitPhysicalHashJoin(PhysicalHashJoin<? extends Plan, ?
return join;
}

@Override
public PhysicalNestedLoopJoin visitPhysicalNestedLoopJoin(
PhysicalNestedLoopJoin<? extends Plan, ? extends Plan> 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<Plan> getAncestors(Plan plan) {
List<Plan> ancestors = Lists.newArrayList();
ancestors.add(plan);
Expand Down

0 comments on commit 895f1d4

Please sign in to comment.