englefly commented on code in PR #70516:
URL: https://github.com/apache/doris/pull/70516#discussion_r4625665480


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RuntimeFilterPushDownVisitor.java:
##########
@@ -308,6 +316,25 @@ && canPushThroughJoinChild(join, false, ctx)) {
                 }
                 if (newTarget != null && newTarget.getInputSlots().size() == 1
                         && !newTarget.equals(ctx.srcExpr)) {
+                    if (expandByOuterJoin) {
+                        Plan preserved = join.getJoinType().isLeftOuterJoin() 
? leftNode : rightNode;
+                        Plan nonPreserved = 
join.getJoinType().isLeftOuterJoin() ? rightNode : leftNode;
+                        // For (L LEFT JOIN R ON L.k = R.k) JOIN E ON L.k = 
E.k, an R row
+                        // matching a needed L row must pass the same RF(E.k). 
Only derive
+                        // from the preserved side: outer join output keys are 
not equivalent.
+                        // Limit this to direct keys with identical types so 
both targets use
+                        // the same equality and RF encoding without 
additional conversions.
+                        // A computed key such as R.k + 1 may already be a 
projected slot;
+                        // unlike a direct column alias, it has no original 
column metadata.
+                        if (!(equalTo instanceof EqualTo)
+                                || !PlanUtils.isColumnRef(ctx.probeExpr) || 
!PlanUtils.isColumnRef(newTarget)

Review Comment:
   done



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