xinyiZzz commented on a change in pull request #8745:
URL: https://github.com/apache/incubator-doris/pull/8745#discussion_r839569854
##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/Planner.java
##########
@@ -266,6 +271,57 @@ public void createPlanFragments(StatementBase statement,
Analyzer analyzer, TQue
}
}
+ private class FindTuplePredicate implements
com.google.common.base.Predicate<PlanNode> {
+ private final TupleId tupleId;
+
+ FindTuplePredicate(TupleId id) {
+ tupleId = id;
+ }
+
+ @Override
+ public boolean apply(PlanNode arg) {
+ return arg.getTupleIds().size() == 1 && arg.getTupleIds().get(0)
== tupleId
+ && (!arg.conjuncts.isEmpty() ||
!arg.runtimeFilters.isEmpty());
+ }
+ }
+
+ private boolean isNodeHasConjuncts(PlanNode rootNode, TupleId tupleId) {
+ List<PlanNode> nodes = Lists.newArrayList();
+ rootNode.collectAll(new FindTuplePredicate(tupleId), nodes);
+ return !nodes.isEmpty();
+ }
+
+ private void removeUselessRuntimeFilters(PlanNode root) {
Review comment:
I understand that this is a very infrequently used func and should have
a recognizable name.
Alternatively, we can look for other scenarios that require less RF and
extend the range.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]