Dandandan commented on a change in pull request #694:
URL: https://github.com/apache/arrow-rs/pull/694#discussion_r689082341



##########
File path: arrow/src/array/array_primitive.rs
##########
@@ -44,6 +44,19 @@ const MICROSECONDS: i64 = 1_000_000;
 const NANOSECONDS: i64 = 1_000_000_000;
 
 /// Array whose elements are of primitive types.
+///
+/// # Example: From an iterator of values
+///
+/// ```
+/// use arrow::array::{Array, PrimitiveArray};
+/// use arrow::datatypes::Int32Type;
+/// let arr: PrimitiveArray<Int32Type> = 
PrimitiveArray::from_iter_values(0..10);

Review comment:
       Maybe the example could be slightly more complex to show that's not just 
a range?
   
   E.g. `(0..10).map(|x| x +1)`?




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