neilconway opened a new pull request, #20639: URL: https://github.com/apache/datafusion/pull/20639
## Which issue does this PR close? N/A ## Rationale for this change `array_to_string` used a temporary buffer to convert array elements to a string, before then copying that buffer into a `StringBuilder` via `append_value`. We can skip this copy by arranging to write directly into the `StringBuilder's buffer because it implements `fmt::Write`. This is a 12-18% performance improvement on the `array_to_string` benchmarks. ## What changes are included in this PR? * Optimization * Change the signature of the `append` closure to return `Result`, which avoids a lot of `unwrap` clutter ## Are these changes tested? Yes -- covered by existing tests and benchmarks. ## 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]
