alamb commented on code in PR #2114:
URL: https://github.com/apache/arrow-rs/pull/2114#discussion_r927010336


##########
arrow/src/array/mod.rs:
##########
@@ -42,6 +44,19 @@
 //! }
 //! ```
 //!
+//! Additionally, there are convenient functions to do this casting
+//! such as [`as_primitive_array<T>`] and [`as_string_array`]:
+//!
+//! ```
+//! # use arrow::array::*;
+//! # use arrow::datatypes::*;
+//! #
+//! fn as_f32_slice(array: &dyn Array) -> &[f32] {
+//!     // use as_primtive_array
+//!     as_primitive_array<Float32Type>().values()

Review Comment:
   Indeed 👍 



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