This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 7b900d9 Doctests for arrays - via collect method. (#785)
7b900d9 is described below
commit 7b900d94dbf82e45a59b39f8b471247d9c713df5
Author: Navin <[email protected]>
AuthorDate: Wed Sep 22 02:15:40 2021 +1000
Doctests for arrays - via collect method. (#785)
---
arrow/src/array/mod.rs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/arrow/src/array/mod.rs b/arrow/src/array/mod.rs
index bd791f9..3775ffb 100644
--- a/arrow/src/array/mod.rs
+++ b/arrow/src/array/mod.rs
@@ -135,15 +135,75 @@ pub use self::array::make_array;
pub use self::array::new_empty_array;
pub use self::array::new_null_array;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::Int8Array;
+/// let arr : Int8Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type Int8Array = PrimitiveArray<Int8Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::Int16Array;
+/// let arr : Int16Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type Int16Array = PrimitiveArray<Int16Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::Int32Array;
+/// let arr : Int32Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type Int32Array = PrimitiveArray<Int32Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::Int64Array;
+/// let arr : Int64Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type Int64Array = PrimitiveArray<Int64Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::UInt8Array;
+/// let arr : UInt8Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type UInt8Array = PrimitiveArray<UInt8Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::UInt16Array;
+/// let arr : UInt16Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type UInt16Array = PrimitiveArray<UInt16Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::UInt32Array;
+/// let arr : UInt32Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type UInt32Array = PrimitiveArray<UInt32Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::UInt64Array;
+/// let arr : UInt64Array = [Some(1), Some(2)].into_iter().collect();
+/// ```
pub type UInt64Array = PrimitiveArray<UInt64Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::Float32Array;
+/// let arr : Float32Array = [Some(1.0), Some(2.0)].into_iter().collect();
+/// ```
pub type Float32Array = PrimitiveArray<Float32Type>;
+///
+/// # Example: Using `collect`
+/// ```
+/// # use arrow::array::Float64Array;
+/// let arr : Float64Array = [Some(1.0), Some(2.0)].into_iter().collect();
+/// ```
pub type Float64Array = PrimitiveArray<Float64Type>;
pub type Int8DictionaryArray = DictionaryArray<Int8Type>;