yongster opened a new pull request, #10699: URL: https://github.com/apache/arrow-rs/pull/10699
# Which issue does this PR close? Closes #<issue-number> # Rationale for this change `and_not` produced incorrect values for sliced `BooleanArray`s. The implementation passed the left and right bitmap offsets to `buffer_bin_and_not` in reverse order. It also reapplied `left.offset()` when wrapping a buffer that had already been normalized to offset zero. As a result, `and_not(left, right)` could differ from its documented equivalent, `and(left, not(right))`, when the input arrays were slices. # What changes are included in this PR? - Pass the bitmap offsets to `buffer_bin_and_not` in the correct order. - Wrap its normalized result with offset `0`. - Add regression tests for sliced inputs with matching and different offsets. # Are there any user-facing changes? No API changes. This fixes incorrect results returned by the existing public `and_not` API when called with sliced `BooleanArray`s. # Tests ```text cargo test -p arrow-arith and_not cargo fmt --check -- 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]
