neilconway opened a new pull request, #20803: URL: https://github.com/apache/datafusion/pull/20803
## Which issue does this PR close? N/A ## Rationale for this change I'd like to optimize `substr` for scalar `start`/`count` inputs, but the code would benefit from some refactoring and cleanup first. I also added benchmarks for `substr` with scalar args. ## What changes are included in this PR? - Refactor `string_view_substr` and `string_substr` to use a single loop - Change `get_true_start_end` to validate its own inputs - Add benchmark cases for scalar `start` and `count` arguments - Improve documentation for `get_true_start_end` and the `start_pos` argument in user-facing docs ## Are these changes tested? Yes. ## Are there any user-facing changes? No, other than an error message wording change. ## AI usage Multiple AI tools were used to iterate on this PR. I have reviewed and understand the resulting code. -- 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]
