You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/20 11:44:49 UTC

[GitHub] [arrow-rs] crepererum commented on issue #2901: API to take back ownership of an ArrayRef

crepererum commented on issue #2901:
URL: https://github.com/apache/arrow-rs/issues/2901#issuecomment-1285385271

   I think `Array` needs a new method for this to work. In addition to `fn as_any(&self) -> &dyn Any` it should also provide `fn as_any_arc(self: &Arc<Self>) -> &Arc<dyn Any + Send + Sync + 'static>` (IIRC this is allowed by current Rust since `Arc` is special). From there you can [downcast the `Arc`](https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast) and (if the user wants to) unwrap it (however for most cases it's OK to keep the concrete array type within the `Arc`).


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org