anandghegde commented on PR #11076: URL: https://github.com/apache/arrow-rs/pull/11076#issuecomment-5965205912
Good catch — you're right. When relocating the bool casts into the `numeric` submodule during the merge-up, I took upstream's post-#11242 `cast_numeric_to_bool` (`from_unary`) but left the **pre-#11242 iterator-based `bool_to_numeric_cast`** and its `NumCast` bounds in place, silently reverting the word-at-a-time `bit_chunks` optimization. `9164cfce` fixes it: `bool_to_numeric_cast` now matches upstream `main` exactly (64-bit word unpacking via `BooleanArray::bit_chunks`, `T::Native::ONE`/`ZERO`), and the `TO::Native: NumCast` bound is dropped from `cast_bool_to_numeric` as in #11242. `single_bool_to_numeric` stays — it's public API. The #11242 tests (`test_cast_bool_numeric_sliced`, `test_cast_float_to_bool_special_values`) were already present in `mod.rs`'s test module via the merge and now exercise the optimized path. `cargo test -p arrow-cast` (417 tests), clippy and fmt clean. Also double-checked the reverse direction and the other cast families in the module against `upstream/main` — no other stale copies. -- 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]
