scovich commented on code in PR #12455:
URL: https://github.com/apache/arrow-rs/pull/12455#discussion_r4697477736


##########
arrow-array/src/array/mod.rs:
##########
@@ -550,11 +572,106 @@ unsafe impl Array for ArrayRef {
     }
 }
 
+// Ergonomics: allow passing e.g. `&Arc<Int32Array>` to methods that expect 
`&dyn Array`
+unsafe impl<T: Array + 'static> Array for Arc<T> {

Review Comment:
   Update: Reverted. A source audit of the entire arrow-rs code base found only 
ten `array.as_ref()` sites out of 600+ that benefit. Against two that the 
change broke, and against 32 sites that need either `as_ref` or `as &dyn Array` 
for type inference reasons. Not enough gain for the downsides.



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