andygrove opened a new pull request, #7644:
URL: https://github.com/apache/datafusion-comet/pull/7644

   ## 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` merges only the first state of such 
a batch and ignores the rest, so the filter it builds can miss values and a 
runtime filter built from it can drop rows that should survive. Reading 
`BinaryArray::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 383ec5627c (`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 in `bloom_filter_agg.rs` plus the 
integration test `native/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.2` is 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-expr` and the new `bloom_filter_merge` integration test 
pass, and `cargo check --all-targets -p datafusion-comet-spark-expr` and `cargo 
fmt --check` are clean. With `bloom_filter_agg.rs` restored to `branch-1.2`'s 
version, `grouped_final_bloom_filter_merges_batched_states` fails (`left: 2, 
right: 1` in the accumulator's state-row assertion), so the branch has the bug 
and the test catches it. The change is Rust only, so I did not run any JVM 
suites.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to