Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Work in progress / experimental. Do not merge. This is a companion to a DataFusion draft PR: apache/datafusion#26330.
It temporarily patches DataFusion to a 55.2.0 backport of that change (
andygrove/datafusion@448ed53).Which issue does this PR close?
No issue is closed: this is an experimental companion to the DataFusion PR. Related: #1900, #2315.
Rationale for this change
DataFusion's
JoinSelectionpromotes a small build side toCollectLeftfor every join type. Ballista runs each partition as an isolated task, and in that settingCollectLeftis wrong for joins that emit build-side rows (Left,LeftSemi,LeftAnti,LeftMark,Full): every task emits those rows. TPC-DS q77, for example, came back 16x inflated (#2315).Ballista works around this with two pieces of its own code (#1900):
DemoteUnsafeBroadcastJoinRule, which the adaptive planner splices in right after DataFusion'sjoin_selection.collect_left_broadcast_safe, used by the static planner and the adaptive join resolver.The companion DataFusion PR adds the option
datafusion.execution.isolated_partitions. With it set,JoinSelectionmakes broadcast-safe choices itself. This PR shows what Ballista gains: it turns the option on and deletes its own workaround.What changes are included in this PR?
datafusion.execution.isolated_partitions = truein Ballista's session defaults (ballista/core/src/extension.rs).DemoteUnsafeBroadcastJoinRule, and stop splicing it in after DataFusion'sjoin_selectionin the adaptive planner.collect_left_broadcast_safewith DataFusion'sJoinType::emits_build_side_rows()in the static planner, the adaptive join resolver and their test oracles, then delete the helper.[patch.crates-io]pins DataFusion to the 55.2.0 backport above.Size: 173 lines removed and 17 added across Ballista's source, not counting the Cargo patch.
Tests (run locally with this change):
cargo test --workspace: 1,599 passed, 0 failed, 8 ignored.ballista-scheduler: 482 passed.Ballista's static-path copy of
JoinSelectionstays. It also carries the swap guard from #1691 and the zero-statistics check, which the DataFusion option deliberately does not cover.Are there any user-facing changes?
No. Plans are unchanged; the DataFusion option replaces Ballista's own rule.