This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch tpch500
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/tpch500 by this push:
new 895f1d469f8 [tmp] the jump count of NLJ is 2 for runtime filter prune
on external db (#29367)
895f1d469f8 is described below
commit 895f1d469f8ec3ffa465c8afc8e06f96effb405d
Author: minghong <[email protected]>
AuthorDate: Mon Jan 1 23:22:41 2024 +0800
[tmp] the jump count of NLJ is 2 for runtime filter prune on external db
(#29367)
---
.../post/RuntimeFilterPrunerForExternalTable.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
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 0a0cfe04ec6..9e1082b76e3 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.algebra.Join;
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 class RuntimeFilterPrunerForExternalTable extends
PlanPostProcessor {
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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]