neilconway opened a new issue, #20634:
URL: https://github.com/apache/datafusion/issues/20634

   ### Is your feature request related to a problem or challenge?
   
   In both the scalar and array arg paths, `to_char` allocates a string for 
every row, and then does a final copy via `StringArray::from` to convert the 
results to Arrow format.
   
   Instead, we can use a reusable buffer for the output of `ArrayFormatter`, 
and then append into a `StringBuilder`. That avoids the per-row allocation. It 
still does one copy more than necessary -- ideally we'd be able to have 
`ArrayFormatter` write directly into the `StringBuilder`'s buffer directly. But 
that would be a more complex change.
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to