cloud-fan commented on code in PR #58506:
URL: https://github.com/apache/spark/pull/58506#discussion_r4255572292


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/PropagateEmptyRelation.scala:
##########
@@ -123,6 +130,13 @@ abstract class PropagateEmptyRelationBase extends 
Rule[LogicalPlan] with CastSup
             Project(p.left.output ++ nullValueProjectList(p.right), p.left)
           case RightOuter if isFalseCondition && 
canExecuteWithoutJoin(p.right) =>
             Project(nullValueProjectList(p.left) ++ p.right.output, p.right)
+          // No row of either side can find a match, so the join degenerates 
into both sides
+          // padded with nulls and concatenated.
+          case FullOuter if isFalseCondition && canExecuteWithoutJoin(p.left) 
&&

Review Comment:
   **Nit (P3):** No test exercises this new branch in AQE with a broadcast 
query stage on each possible build side. This matters when the normal 
`PropagateEmptyRelation` rule is excluded but the AQE rule remains enabled: 
dropping either corresponding guard would rewrite the join into a union that 
strands a `BroadcastQueryStageExec`, producing an invalid adaptive plan while 
the current tests stay green.
   
   **Verification:**
   - **Regression:** Exercise both left- and right-broadcast adaptive child 
arrangements and fail if either one is detached from the full outer join by the 
empty-relation propagation rule.
   - **Behavior:** Exercise an otherwise equivalent non-broadcast adaptive 
arrangement and verify the eligible false-condition full outer join still 
rewrites to the null-padded union with unchanged rows.



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