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.
Which issue does this PR close?
Backport of #7173 to
branch-1.2. Closes #7172 on this branch.Rationale for this change
A final Bloom filter aggregate can receive several partial filters for one group in a single input batch.
branch-1.2'smerge_batchasserts that the state array holds exactly one row, so such a batch panics the native task. ReadingBinaryArray::value_data()can also merge another group's filter when a grouped input is a slice that starts at a nonzero offset. See #7173 and #7172 for the full analysis.What changes are included in this PR?
Cherry-pick of 383ec56 (
git cherry-pick -x) with no conflicts and no adaptations. It merges each non-null binary row of the state array using its own byte slice, and adds unit tests inbloom_filter_agg.rsplus the integration testnative/spark-expr/tests/bloom_filter_merge.rs. The diff against the source commit is identical apart from line numbers and blob hashes.Other release branches:
branch-1.2is the newest release branch, so there is no newer one to port to.How are these changes tested?
On this branch, with JDK 17: the 33 Bloom filter unit tests in
datafusion-comet-spark-exprand the newbloom_filter_mergeintegration test pass, andcargo check --all-targets -p datafusion-comet-spark-exprandcargo fmt --checkare clean. Withbloom_filter_agg.rsrestored tobranch-1.2's version,grouped_final_bloom_filter_merges_batched_statespanics on that one-row assertion (left: 2, right: 1), so the branch has the bug and the test catches it. The change is Rust only, so I did not run any JVM suites.