scovich commented on PR #12318:
URL: https://github.com/apache/arrow-rs/pull/12318#issuecomment-7103359815

   > I didn't explore the possibility of `Array::slice` as a starting point 
before
   
   A few observation as I dust off memories:
   1. #8794 is specifically trying to recover an `Arc<T: Array>` from `Arc<dyn 
Array>` _without cloning_ (a downcast of sorts), which is a different problem 
than `Array::to_arc` would solve.
   2. If we're ok with cloning, then we don't even need to start from 
`Array::slice`. Every in-tree `T: Array` is also `T: Clone`, so `to_arc` for 
all the concrete array types is just `Arc::new(self.clone())`. If we wanted a 
provided `to_arc`, that would have to delegate to `Array::slice` because we 
don't require `Array: Clone`. 


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