alamb opened a new issue, #21997: URL: https://github.com/apache/datafusion/issues/21997
I think you could avoid a lot of this copy / paste by using a `StringViewBuilder` with the `append_block` and `append_view_unchecked` methods https://docs.rs/arrow/latest/arrow/array/type.StringViewBuilder.html#method.append_block That being said, I do think it could be slightly slower than this implementation because it would have to re-check the length It almost seems like what we want is some sort of API on `StringViewArray` itself, similar to https://docs.rs/arrow/latest/arrow/array/struct.PrimitiveArray.html#method.unary So this code could be written something like ```rust let new_array = orig_array.map_values(convert) ``` That would also let us do potentially crazy things like reuse the buffer allocations and modify the values in place if they weren't shared 🤔 If that makes sense to you I can file a ticket in arrow-rs perhaps. _Originally posted by @alamb in https://github.com/apache/datafusion/pull/21980#discussion_r3178091741_ -- 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]
