yashkuceriya opened a new pull request, #10913: URL: https://github.com/apache/arrow-rs/pull/10913
# Which issue does this PR close? - Part of #10245. # Rationale for this change The byte-array scalar zip path is one of the remaining `OffsetBufferBuilder` callsites listed in #10245. Constructing the offsets directly in a `Vec` also allows each truthy or falsy run to validate its total length once before extending the cumulative offsets. A temporary release-mode microbenchmark exercised a mixed 4,096-row mask with two UTF-8 scalars for 10,000 iterations. In three alternating runs, the median was 3.18 ns/row for this change and 3.38 ns/row for current `main`, an improvement of about 5.9%. The temporary benchmark was not committed. # What changes are included in this PR? `BytesScalarImpl::create_output_on_non_nulls` now builds offsets with `Vec<T::Offset>`. It preserves the existing capacity, cumulative-offset, overflow, and monotonicity behavior. # Are these changes tested? Yes: - `cargo +stable fmt --all -- --check` - `cargo test -p arrow-select` - 417 unit tests and 17 documentation tests passed - `cargo clippy -p arrow-select --all-targets --all-features -- -D warnings` Existing zip tests cover regular and large byte arrays, mixed masks, fragmented masks, nulls, and one-sided scalar paths. # Are there any user-facing changes? No. # Automated assistance Automated assistance was used to identify the requested callsite and draft the initial refactor. I reviewed the implementation, fixed compiler findings, rejected a slower first version after benchmarking, verified the final offset and overflow behavior against `OffsetBufferBuilder`, and ran all checks listed above. -- 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]
