Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-48155][FOLLOWUP][SQL] AQEPropagateEmptyRelation for left anti …
…join should check if remain child is just BroadcastQueryStageExec ### What changes were proposed in this pull request? As title. ### Why are the changes needed? We encountered BroadcastNestedLoopJoin LeftAnti BuildLeft, and it's right is empty. It is left child of left outer BroadcastHashJoin. The case is more complicated, part of the Initial Plan is as follows ``` :- Project (214) : +- BroadcastHashJoin LeftOuter BuildRight (213) : :- BroadcastNestedLoopJoin LeftAnti BuildLeft (211) : : :- BroadcastExchange (187) : : : +- Project (186) : : : +- Filter (185) : : : +- Scan parquet (31) : : +- LocalLimit (210) : : +- Project (209) : : +- BroadcastHashJoin Inner BuildLeft (208) : : :- BroadcastExchange (194) : : : +- Project (193) : : : +- BroadcastHashJoin LeftOuter BuildRight (192) : : : :- Project (189) : : : : +- Filter (188) : : : : +- Scan parquet (37) : : : +- BroadcastExchange (191) ``` After AQEPropagateEmptyRelation, report an error "HashJoin should not take LeftOuter as the JoinType with building left side" ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48300 from zml1206/SPARK-48155-followup. Authored-by: zml1206 <zhuml1206@gmail.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information