ParkMyCar commented on issue #6104:
URL: https://github.com/apache/arrow-rs/issues/6104#issuecomment-2251378574

   Darn, yeah orphan rules and crate layout currently prevent it.
   
   ```
   // approach 1 
   //
   // In the `arrow-data` crate, this doesn't work because `arrow-array` 
depends on `arrow-data`
   // and we'd end up with a circular dependency.
   impl Into<Arc<dyn Array>> for ArrayData { ... }
   ```
   
   ```
   // approach 2
   //
   // In the `arrow-array` crate. I thought this would work, and it does if we 
used
   // `Box<dyn Array>`, but `Arc` is not marked as "fundamental" like Box is.
   //
   // See: 
https://users.rust-lang.org/t/how-to-bypass-or-relax-orphan-rules/82999
   impl From<ArrayData>  for Arc<dyn Array> { ... }
   ```


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