beliefer opened a new pull request, #40789: URL: https://github.com/apache/spark/pull/40789
### What changes were proposed in this pull request? Currently, Spark supports the array_insert and array_prepend. Users insert an element into the head of array is common operation. Considered, we want make array_prepend reuse the implementation of array_insert, but it seems a bit performance worse if the position is foldable and equals to zero. The reason is that always do the check for position is negative or positive, and the code is too long. Too long code will lead to JIT failed. ### Why are the changes needed? Improve ArrayInsert if the position is foldable and equals to zero. ### Does this PR introduce _any_ user-facing change? 'No'. Just change the inner implementation. ### How was this patch tested? Exists test cases. -- 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]
