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/01/02 15:43:04 UTC

[GitHub] [arrow-rs] alamb commented on a change in pull request #1129: Implement Array for ArrayRef, Improve as_* kernels to take `&dyn Array`

alamb commented on a change in pull request #1129:
URL: https://github.com/apache/arrow-rs/pull/1129#discussion_r777225544



##########
File path: arrow/src/array/cast.rs
##########
@@ -21,7 +21,7 @@ use crate::array::*;
 use crate::datatypes::*;
 
 /// Force downcast ArrayRef to PrimitiveArray<T>
-pub fn as_primitive_array<T>(arr: &ArrayRef) -> &PrimitiveArray<T>
+pub fn as_primitive_array<T>(arr: &dyn Array) -> &PrimitiveArray<T>

Review comment:
       As `ArrayRef` now implements `Array` all previous calls to this function will still compile and we can also pass `&dyn Array` as well




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