starocean999 commented on code in PR #8745:
URL: https://github.com/apache/incubator-doris/pull/8745#discussion_r845786491
##########
fe/fe-core/src/main/java/org/apache/doris/planner/RuntimeFilterGenerator.java:
##########
@@ -122,6 +124,33 @@ private RuntimeFilterGenerator(Analyzer analyzer) {
bloomFilterSizeLimits = new FilterSizeLimits(sessionVariable);
}
+ private void collectAllTupleIdsHavingConjunct(PlanNode node,
HashSet<TupleId> tupleIds) {
+ // for simplicity, skip join node( which contains more than 1 tuple id
)
+ // we only look for the node meets either of the 2 conditions:
+ // 1. The node itself has conjunct
+ // 2. it's an aggregation or exchange node with no conjunct, but its
descendant have conjuncts.
+ int tupleNumBeforeCheckingChildren = tupleIds.size();
+ for (PlanNode child : node.getChildren()) {
+ collectAllTupleIdsHavingConjunct(child, tupleIds);
+ }
+ if ((node.getTupleIds().size() == 1 && !node.conjuncts.isEmpty())) {
+ // The node itself has conjunct
+ tupleIds.add(node.getTupleIds().get(0));
+ } else if ((node instanceof AggregationNode || node instanceof
ExchangeNode) && tupleIds.size() > tupleNumBeforeCheckingChildren) {
Review Comment:
I tested on TPCH queries, only join node can be skipped when collecting the
tuple ids of nodes which having conjunct. currently, join node has more then 1
descendant tuple ids, it's safe to skip it. And the first version is to remove
the invalid runtime filters after entire runtime filter are generated, do you
mean it's better to change it back to old way?
--
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]