Skip to content

Return coalescer errors from sort-merge joins - #27731

Open
efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:efe/datafusion-sort-merge-coalescer-27728
Open

efegokdemir wants to merge 1 commit into
apache:mainfrom
efegokdemir:efe/datafusion-sort-merge-coalescer-27728

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

A sort-merge join can panic when its output coalescer rejects a batch, instead of returning the execution error to the query.

What changes are included in this PR?

Propagate errors from all five coalescer push sites in MaterializingSortMergeJoinStream. Add a regression test for a dictionary-key overflow in filtered join output.

What is the testing strategy for this PR?

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --profile ci -p datafusion-physical-plan --lib joins::sort_merge_join::tests --locked (498 passed)

Are there any user-facing changes?

The join returns a query error instead of panicking when output batches cannot be coalesced.

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SortMergeJoinExec panics instead of returning an error when its output coalescer rejects a batch

1 participant