theirix opened a new pull request, #19980: URL: https://github.com/apache/datafusion/pull/19980
## Which issue does this PR close? - Closes #19749. ## Rationale for this change A follow-up to an optimisation of the `left` function in #19571 ## What changes are included in this PR? - Improve performance to O(1) by eliminating more string copies. Discover a byte offset for the last character for both positive and negative length arguments and slice bytes directly. - For LargeUtf8 (`StringViewArray`), implement a zero-copy slice operation reusing the same Arrow buffers. It is possible for both views since the string only shrinks. We only need to tune a German prefix. - An Arrow view construction helper `shrink_string_view_array_view` is included in this PR. Unfortunately, string view builders cannot provide a way to reuse Arrow buffers. I believe it should better reside in the core Arrow crates instead - I can follow up on it. ## Are these changes tested? - Additional unit tests - SLTs ## 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]
