efegokdemir opened a new pull request, #11489:
URL: https://github.com/apache/arrow-rs/pull/11489

   # Which issue does this PR close?
   
   - Closes #11379
   
   # Rationale for this change
   
   Boolean interleave currently uses `MutableArrayData` for every selection. 
That path is effective for contiguous ranges, but scattered selections pay 
range-copy bookkeeping for individual bitmap bits.
   
   # What changes are included in this PR?
   
   This adds a Boolean-specific path that gathers packed values and reuses the 
shared interleave validity handling. Selections containing a 64-row contiguous 
run keep the existing fallback, which remains faster for clustered input. 
Bounds are checked before accessing Boolean values so invalid indices continue 
to return an error.
   
   The tests cover sliced and nullable inputs, all-null and repeated 
selections, empty input, nested structs, invalid indices, and the 
clustered-range dispatch.
   
   AI use: Codex generated the initial implementation and tests; the changes 
were reviewed against the existing interleave paths and validated with the 
package test suite and a local benchmark.
   
   # Are these changes tested?
   
   All 459 `arrow-select` library tests pass; formatting and Clippy checks 
pass. A local Criterion comparison for 32,768 scattered selections measured 
about 315 µs with the existing fallback and 83 µs with the new path. For runs 
of 64, the adaptive path retained the fallback and measured about 18.3 µs 
(about 19.9 µs before the change).
   
   # Are there any significant user-facing changes?
   
   No API or output changes are intended. This improves performance for 
scattered Boolean selections while preserving the existing path for long 
contiguous runs.
   


-- 
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]

Reply via email to