joe-ucp opened a new pull request, #8876:
URL: https://github.com/apache/arrow-rs/pull/8876
## What issue does this PR close?
- **Part of**: #8806 (Bitwise API consolidation).
This PR extracts the BooleanArray bitwise changes from a larger exploratory
PR to enable focused and independent review.
---
## Rationale
This change consolidates BooleanArray bitwise logic by leveraging new
buffer-level bitwise primitives. By doing so:
- **High-level kernels become simpler** and easier to maintain.
- **Bitmap behavior** (including offsets, tail bits, and nulls) can be
controlled and tested in one place.
---
## Summary of Changes
- **New Helper Methods**
- Add `BooleanArray::binary` and `BooleanArray::unary` methods to operate
on the value bitmap, built on top of `Buffer::bitwise_binary` and
`Buffer::bitwise_unary`.
- **Kernel Updates**
- Update the boolean kernels in `arrow-arith/src/boolean.rs` to use these
new helpers instead of manual bitmap logic.
- **New Tests**
- Add property-based tests in `arrow-arith` to validate the new helpers
against existing logic across a range of offsets and lengths.
- Add `rand` as a dev-dependency to `arrow-arith` for randomized testing.
- **No Change To**
- No updates to `nullif` or other higher-level APIs in this PR.
---
## Testing
- `cargo test -p arrow-array --lib`
- `cargo test -p arrow-arith --lib`
- `cargo test -p arrow-select --lib`
All tests pass.
---
## User-Facing Changes
**None.**
This is an internal refactor: new helpers and tests only. No changes to
existing public APIs or observable behavior.
--
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]