2188: fix(scheduler): preserve null-aware anti joins during planning - #86
2188: fix(scheduler): preserve null-aware anti joins during planning#86martin-augment wants to merge 2 commits into
Conversation
Null-aware LeftAnti joins cannot be swapped and require CollectLeft for correct NULL semantics. Preserve those invariants in static join selection, the distributed broadcast planner, unbounded-input handling, and AQE. Add regression tests for already-partitioned joins, unbounded inputs, static broadcast demotion, and adaptive join selection. Closes apache#2187 Signed-off-by: Phillip LeBlanc <879445+phillipleblanc@users.noreply.github.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
WalkthroughUpdated review guidance files with restrictions on GitHub links and AI agent configuration files. Refined physical, distributed, and adaptive join optimization so null-aware anti joins retain CollectLeft partitioning and are not swapped. Added regression tests covering partition correction, planner demotion prevention, unbounded-input handling, and AQE input preservation. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🤖 Augment PR SummarySummary: This PR adjusts Ballista’s join planning/optimization to correctly preserve DataFusion’s null-aware anti join semantics. Changes:
Technical Notes: The changes aim to prevent accidental creation of swapped/invalid null-aware anti joins (e.g., via join-type swapping) and to keep the required 🤖 Was this summary useful? React with 👍 or 👎 |
| // A null-aware anti join requires global build-side state. | ||
| // Correct an already-partitioned plan to CollectLeft instead | ||
| // of leaving it partitioned or swapping it to RightAnti. | ||
| Some(partitioned_hash_join(hash_join)?) |
There was a problem hiding this comment.
partitioned_hash_join will flip this already-Partitioned null-aware join to CollectLeft, but HashJoinExec requires the left input to have exactly 1 output partition in CollectLeft mode. Since an already-partitioned join typically has multi-partition children, this risks an invalid plan / runtime assertion unless a later distribution-enforcement step coalesces the left side.
Severity: high
Other Locations
ballista/scheduler/src/physical_optimizer/join_selection.rs:329
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
2188: To review by AI