neilconway opened a new pull request, #20620: URL: https://github.com/apache/datafusion/pull/20620
## Which issue does this PR close? - Closes #20619 . ## Rationale for this change The current implementation of `array_concat` creates an `ArrayRef` for each row, uses Arrow's `concat` kernel to merge the elements together, and then uses `concat` again to produce the final results. This does a lot of unnecessary allocation and copying. Instead, we can use `MutableArrayData::extend` to copy element ranges in bulk, which avoids much of this intermediate copying and allocation. This approach is 5-15x faster on a microbenchmark. ## What changes are included in this PR? * Add benchmark * Improve SLT test coverage for `array_concat` * Implement optimization ## Are these changes tested? Yes, and benchmarked. ## Are there any user-facing changes? No. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
