Rich-T-kid opened a new issue, #11563: URL: https://github.com/apache/arrow-rs/issues/11563
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** Part of #7761 and related to #7764. #11174 routes non-null `UInt32` indices through `BatchCoalescer::push_batch_with_index`. Primitive, byte-view, and fixed-size binary arrays have specialized indexed-copy implementations, but `StringArray` still uses the generic `copy_rows_by_indices` fallback. That fallback calls `take` to materialize the selected strings and then feeds the result through `GenericInProgressArray`, so the indexed path does not avoid the extra UTF-8 materialization and copy. The [GKE benchmark run](https://github.com/apache/arrow-rs/pull/11174#issuecomment-6176104001) shows the regression most clearly for sparse `single_utf8` inputs: | nulls | selectivity | main | #11174 | change | |---:|---:|---:|---:|---:| | 0 | 0.001 | 35.8 ms | 43.6 ms | 22% slower | | 0 | 0.01 | 12.1 ms | 13.1 ms | 8% slower | | 0.1 | 0.001 | 46.3 ms | 53.3 ms | 15% slower | | 0.1 | 0.01 | 13.7 ms | 14.7 ms | 8% slower | **Describe the solution you'd like** Add a specialized indexed-copy implementation for `StringArray` that gathers offsets, copies selected values directly into the in-progress buffers, and gathers nulls without first building an intermediate array with `take`. The implementation should preserve the existing bounds-checking contract and cover nullable and non-null arrays, repeated or out-of-order indices, and chunking across the target batch size. Use `coalesce_kernels` with `BENCH_FILTER=take` to verify the sparse `single_utf8` cases recover the regression without hurting dense or mixed UTF-8 cases. **Additional context** #7764 tracks specialization of the regular `push_batch` path. This issue is narrower: the indexed `push_batch_with_indices` / `copy_rows_by_indices` path introduced in #11174. -- 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]
