tobixdev opened a new pull request, #8543: URL: https://github.com/apache/arrow-rs/pull/8543
# Which issue does this PR close? - Closes #8505 . # Rationale for this change Fix the bug and align `BooleanArray::from_iter` to `PrimitiveArray::from_iter` # What changes are included in this PR? - Use builders in `BooleanArray::from_iter` to fix the wrong behavior - Introduce `BooleanArray::from_trusted_len_iter` for a more performant version (The old version of `BooleanArray::from_iter`, just with unsafe flavor of `bit_util::set_bit_raw`) - Add `BooleanAdapter`, inspired by `NativeAdapter` from the `PrimitiveArray`. This allows also doing `BooleanArray::from_iter([true, false].into_iter())`. # Are these changes tested? - New test to cover the initial bug - New test to cover `BooleanArray::from_trusted_len_iter` directly (old `BooleanArray::from_iter` also cover it indirectly) - New test to document that you can directly collect `[false, true, ...]` (no `Option`) # Are there any user-facing changes? - `BooleanArray::from_iter` has a "slight" performance regression that users could observe. - Allow directly collecting bools to a `BooleanArray` - `BooleanArray::from_trusted_len_iter` -- 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]
