mbutrovich opened a new pull request, #12517: URL: https://github.com/apache/arrow-rs/pull/12517
# Which issue does this PR close? - Part of #12516. # Rationale for this change This is the first task of the epic: a crate with no dependencies for bit and byte primitives shared by arrow and parquet. Moving `bit_chunk_iterator` first lets parquet reach `UnalignedBitChunk` without the `arrow` feature, which the epic's `count_set_bits` task needs. # What changes are included in this PR? The commits read in order: 1. Moves the `bit_chunk_iterator` tests to their own file in `arrow-buffer`, unchanged. 2. Adds `arrow-bitutils` and moves `bit_chunk_iterator.rs` into it. The move shows as a rename. The only edits replace three `arrow-buffer` helpers the file used: `ceil` becomes `usize::div_ceil`, `read_u64` becomes a private copy, and `ToByteSlice` in the aarch64 popcount kernel becomes `as_flattened`. `arrow-buffer` re-exports the module, so `arrow_buffer::bit_chunk_iterator` paths don't change. The crate is registered in the workspace, CI, Miri, the labeler, and the release instructions the same way as `arrow-cmp`. `verify-release-candidate.sh` now dry-runs `arrow-bitutils` instead of `arrow-buffer`, because `arrow-bitutils` is the leaf crate. The tests stay in `arrow-buffer` because they build their inputs with `Buffer`. Miri covers the moved `unsafe` code through them. The crate name is still open (https://github.com/apache/arrow-rs/issues/12467#issuecomment-7172415844), and it needs to be settled before this is released. # Are these changes tested? The moved tests are in `arrow-buffer/src/util/bit_chunk_iterator_tests.rs`. `arrow-buffer`'s own calls to `BitChunks::new`, which has no `#[inline]`, now cross a crate boundary. `boolean_append_packed`, `buffer_bit_ops`, and `boolean_kernels` reach those calls. In #12470, which made the same move, `boolean_append_packed` was within noise on arm64 (https://github.com/apache/arrow-rs/pull/12470#issuecomment-7172978565) and amd64 (https://github.com/apache/arrow-rs/pull/12470#issuecomment-7172982313). # Are there any significant user-facing changes? A new crate, `arrow-bitutils`, whose public items are the existing `UnalignedBitChunk`, `UnalignedBitChunkIterator`, `BitChunks`, and `BitChunkIterator`, now in `arrow_bitutils::bit_chunk_iterator`. `arrow-buffer` re-exports them and gains a dependency on `arrow-bitutils`, which adds no third-party crates. `arrow-bitutils` has to be published before `arrow-buffer`, which `dev/release/README.md` now does. No breaking changes. # AI usage disclosure I wrote this PR with help from Claude but understand and support the core approach, implementation, and test coverage. -- 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]
