starocean999 commented on code in PR #8745:
URL: https://github.com/apache/incubator-doris/pull/8745#discussion_r843697029


##########
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:
   I assume the targetSlots is where the runtime filter goes to.( if not, pls 
corret me ) In that case, the runtime filter can be treated as a normal 
conjunct. So if hash join node's build side is a scan node with no conjunct 
originally, but it has a runtime filter, we can also create a new runtime 
filter for it and push it to probe side.



-- 
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]

Reply via email to