tustvold commented on issue #4506:
URL: https://github.com/apache/arrow-rs/issues/4506#issuecomment-1632875068

   So a couple of comments in no particular order:
   
   * The destructing APIs added as part of #3879 likely supercede many of these 
APIs, including from_value
   * ArrayData::into_builder is different from the array into_builder, in that 
it copies the data
   * The array into_builder methods are fallible and can only be used where it 
can be guaranteed there are no shared references to the underlying buffers, I 
suspect they will therefore be of limited utility to DataFusion which is not 
setup to provide these guarantees
   * I'm not sure into_builder is tractable for ListBuilder, etc... as the 
builders are generic on the child builders, whereas the arrays are not
   * I don't really see the value of having `*Array::builder` methods, they are 
imo a historical artifact, I'm not sure why you wouldn't just use the builder 
constructors directly
   
   > further implementations of array functions in Arrow DataFusion, several 
methods may be required, in particular, transfer from Array to Builder.
   
   I would be surprised to see the array kernels making use of builders, 
instead I would expect the use of the arrow-select kernels or MutableArrayData. 
This would not only be simpler, but would avoid problems around recursive type 
definitions. Perhaps you could link to what you are trying to achieve and I can 
advise?


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

Reply via email to