alamb opened a new pull request, #10053: URL: https://github.com/apache/arrow-rs/pull/10053
# Which issue does this PR close? N/A — test-only follow-up to #9625. # Rationale for this change While reviewing #9625 (which rewrites `take_bytes`), I noticed two paths in the existing test suite were not directly exercised: 1. **Taking from a *sliced* byte array** — where the array's value offsets no longer start at zero. The existing `test_take_slice_string` slices the *indices*, not the *values* array, so the byte-copy logic was never tested against a non-zero base offset. 2. **The `OffsetOverflowError` on the nullable path** — `test_take_bytes_offset_overflow` only uses non-null indices, so it only covers the no-null fast path. These tests pass against `main` today; they harden the existing behavior and give #9625 (and future `take_bytes` changes) better coverage of the byte-copy and overflow paths. # What changes are included in this PR? Two new tests in `arrow-select/src/take.rs`: - `test_take_bytes_sliced_values` — takes from a byte array sliced so its value offsets are non-zero, covering both the no-null fast path and the nullable path (null indices and selected null values). - `test_take_bytes_offset_overflow_nullable` — verifies `OffsetOverflowError` is produced on the nullable code path. Uses a single large value selected many times so the index array stays small. # Are these changes tested? These changes *are* tests. They pass on the current implementation. # Are there any user-facing changes? None. -- 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]
