Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the jump count of NLJ is 2 for runtime filter prune on external db #29367

Merged
merged 2 commits into from
Jan 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading