alamb commented on code in PR #6141:
URL: https://github.com/apache/arrow-rs/pull/6141#discussion_r1693951515
##########
arrow-array/src/array/mod.rs:
##########
@@ -437,13 +437,84 @@ impl<'a, T: Array> Array for &'a T {
/// A generic trait for accessing the values of an [`Array`]
///
+/// This trait helps write specialized implementations of algorithms for
+/// different array types. Specialized implementations allow the compiler
+/// to optimize the code for the specific array type, which can lead to
+/// significant performance improvements.
+///
+/// # Example
Review Comment:
This example is adapted from https://github.com/apache/datafusion/pull/11676
##########
arrow/src/lib.rs:
##########
@@ -81,10 +86,11 @@
//!
//! # Type Erasure / Trait Objects
//!
-//! It is often the case that code wishes to handle any type of array, without
necessarily knowing
-//! its concrete type. This use-case is catered for by a combination of
[`Array`]
-//! and [`DataType`](datatypes::DataType), with the former providing a
type-erased container for
-//! the array, and the latter identifying the concrete type of array.
+//! It is common to write code that handles any type of array, without
necessarily
Review Comment:
I tried to make this less verbose so it was easier to read.
--
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]