Repository navigation
fix: [branch-1.1] keep the values of sliced batches when coalescing a broadcast (#6900) - #7328
Open
laxmanmamididd wants to merge 1 commit into
Open
laxmanmamididd wants to merge 1 commit into
laxmanmamididd wants to merge 1 commit into
Conversation
… broadcast (apache#6900) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Which issue does this PR close?
Backport of #6900 to
branch-1.1. Closes #6779 on this branch.Rationale for this change
branch-1.1has the bug fixed onmainby #6900: a broadcast hash join drops matching rows when the build side emits sliced string or binary batches. NativeDISTINCT, grouped aggregates and window operators emit such batches, andcoalesceBroadcastBatchesappends them withVectorSchemaRootAppender, which assumes offsets that start at zero.We hit it on a production Spark job on Comet 1.1.0. Output was missing 24 of 724,405 rows. At an inner join on a 16-character string key, vanilla Spark produced 30,410 rows and
CometBroadcastHashJoinproduced 30,407 from identical inputs. Withspark.comet.exec.broadcastHashJoin.enabled=falsethe output matched vanilla exactly.What changes are included in this PR?
Cherry-pick of 66c63bd (#6900). The
ffi.mdhunk is placed above this branch's "Wrapper Object Lifecycle" heading because the heading differs frommain.How are these changes tested?
UtilsSuitepasses onbranch-1.1with-Pspark-4.0on JDK 17, and the new testserializeBatches rebases offsets that start past zerofails without the change toUtils.scala.CometJoinSuiteneeds the native library and has not been run locally; CI will run it.🤖 Generated with Claude Code