neilconway opened a new pull request, #20323: URL: https://github.com/apache/datafusion/pull/20323
## Which issue does this PR close? - Closes #20322 ## Rationale for this change `compare_element_to_list` is a utility function used by several of the array-related UDFs (e.g., array_position, array_positions, array_remove, and array_replace). The current implementation extracts a scalar from an array using `arrow::compute::take()`. This is slow; we can just use `slice` directly, which also avoids allocating an intermediate array of indices. ## What changes are included in this PR? ## Are these changes tested? Yes; microbenchmarks indicate 15-50% performance improvement for `array_remove`. ## 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]
