[chore](be) Reject broadcast joins that finalize build side#63445
Merged
BiteTheDDDDt merged 1 commit intoMay 21, 2026
Merged
Conversation
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Broadcast hash joins that need to emit build-side rows after probing, such as right outer, full outer, right semi, and right anti joins, cannot safely share one broadcast build side across multiple local probe instances without an additional global finalization protocol. The frontend already avoids generating these broadcast hash joins, but the backend had no guard if such a plan reached execution. This change rejects unsupported broadcast hash joins during build sink preparation and adds a BE unit test covering the rejected join types.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- ./run-be-ut.sh --run --filter=HashJoinBuildSinkTest.RejectBroadcastJoinThatRequiresBuildSideFinalize
- build-support/clang-format.sh
- build-support/check-format.sh
- Behavior changed: No
- Does this need documentation: No
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
/review |
Contributor
TPC-H: Total hot run time: 31429 ms |
Contributor
There was a problem hiding this comment.
Review result: no blocking issues found.
Critical checkpoint conclusions:
- Goal/test: The PR adds a BE guard rejecting broadcast hash joins that need build-side finalization, and adds a focused BE unit test for right outer, full outer, right semi, and right anti joins.
- Scope: The implementation is small and localized to hash join build sink preparation plus one unit test.
- Concurrency/lifecycle: No new concurrency or lifecycle management is introduced. The guard runs before shared-hash-table enablement/local-state setup, so it avoids the unsafe execution path without changing dependency behavior.
- Configuration/compatibility: No new configs, storage formats, RPC fields, or FE-BE protocol changes.
- Parallel paths: FE already avoids these broadcast joins; this adds the BE-side safety check for the same unsupported class.
- Error handling: Uses a non-OK NotSupported status with the join type in the message; no ignored Status paths observed.
- Memory/transaction/data visibility: No new allocations, transaction handling, or data visibility paths.
- Tests: Unit coverage is present for the rejected join types. I did not run tests in this review runner.
- User focus: No additional user-provided review focus was specified.
Contributor
TPC-DS: Total hot run time: 169874 ms |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
mrhhsg
approved these changes
May 21, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary: Broadcast hash joins that need to emit build-side rows after probing, such as right outer, full outer, right semi, and right anti joins, cannot safely share one broadcast build side across multiple local probe instances without an additional global finalization protocol. The frontend already avoids generating these broadcast hash joins, but the backend had no guard if such a plan reached execution. This change rejects unsupported broadcast hash joins during build sink preparation and adds a BE unit test covering the rejected join types.
Release note
None
Check List (For Author)