xinyiZzz commented on code in PR #8745:
URL: https://github.com/apache/incubator-doris/pull/8745#discussion_r844625661
##########
fe/fe-core/src/main/java/org/apache/doris/planner/RuntimeFilter.java:
##########
@@ -223,6 +227,20 @@ public static RuntimeFilter
create(IdGenerator<RuntimeFilterId> idGen, Analyzer
if (LOG.isTraceEnabled()) {
LOG.trace("Generating runtime filter from predicate " +
joinPredicate);
}
+ if
(ConnectContext.get().getSessionVariable().enableRemoveNoConjunctsRuntimeFilterPolicy)
{
+ if (srcExpr instanceof SlotRef) {
+ if (!tupleHasConjuncts.contains(((SlotRef)
srcExpr).getDesc().getParent().getId())) {
+ // src tuple has no conjunct, don't create runtime filter
+ return null;
+ } else {
+ // runtime filter itself is a valid conjunct, add all the
target tuple ids
+ for (TupleId tupleId: targetSlots.keySet()) {
+ tupleHasConjuncts.add(tupleId);
Review Comment:
At present, the generation of the runtime filter is preorder traversal. I
understand that when the target tuple that generates the runtime filter is
added back to tupleHasConjuncts, the target tuple may have already generated
the runtime filter and needs to be changed to postorder traversal.
--
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]