diff --git a/arrow-arith/src/aggregate.rs b/arrow-arith/src/aggregate.rs index 91623bc22b92..92f880c7149a 100644 --- a/arrow-arith/src/aggregate.rs +++ b/arrow-arith/src/aggregate.rs @@ -332,10 +332,10 @@ fn aggregate, A: Numeric /// Returns the minimum value in the boolean array. /// +/// # Example /// ``` /// # use arrow_array::BooleanArray; /// # use arrow_arith::aggregate::min_boolean; -/// /// let a = BooleanArray::from(vec![Some(true), None, Some(false)]); /// assert_eq!(min_boolean(&a), Some(false)) /// ``` @@ -390,10 +390,10 @@ pub fn min_boolean(array: &BooleanArray) -> Option { /// Returns the maximum value in the boolean array /// +/// # Example /// ``` /// # use arrow_array::BooleanArray; /// # use arrow_arith::aggregate::max_boolean; -/// /// let a = BooleanArray::from(vec![Some(true), None, Some(false)]); /// assert_eq!(max_boolean(&a), Some(true)) /// ``` diff --git a/arrow-ord/src/sort.rs b/arrow-ord/src/sort.rs index fdedbbcae930..39d56f8fe9b2 100644 --- a/arrow-ord/src/sort.rs +++ b/arrow-ord/src/sort.rs @@ -846,7 +846,7 @@ pub struct SortColumn { /// Returns an `ArrowError::ComputeError(String)` if any of the array type is either unsupported by /// `lexsort_to_indices` or `take`. /// -/// Example: +/// # Example: /// /// ``` /// # use std::convert::From; @@ -855,7 +855,6 @@ pub struct SortColumn { /// # use arrow_array::types::Int64Type; /// # use arrow_array::cast::AsArray; /// # use arrow_ord::sort::{SortColumn, SortOptions, lexsort}; -/// /// let sorted_columns = lexsort(&vec![ /// SortColumn { /// values: Arc::new(PrimitiveArray::::from(vec![ diff --git a/arrow-select/src/take.rs b/arrow-select/src/take.rs index 7f7791a07af0..1961a604d928 100644 --- a/arrow-select/src/take.rs +++ b/arrow-select/src/take.rs @@ -1011,7 +1011,6 @@ to_indices_reinterpret!(Int64Type, UInt64Type); /// # use arrow_array::{StringArray, Int32Array, UInt32Array, RecordBatch}; /// # use arrow_schema::{DataType, Field, Schema}; /// # use arrow_select::take::take_record_batch; -/// /// let schema = Arc::new(Schema::new(vec![ /// Field::new("a", DataType::Int32, true), /// Field::new("b", DataType::Utf8, true), diff --git a/arrow-select/src/window.rs b/arrow-select/src/window.rs index fbd145d08d9d..74f7f4a79191 100644 --- a/arrow-select/src/window.rs +++ b/arrow-select/src/window.rs @@ -29,7 +29,6 @@ use num_traits::abs; /// ``` /// # use arrow_array::Int32Array; /// # use arrow_select::window::shift; -/// /// let a: Int32Array = vec![Some(1), None, Some(4)].into(); /// /// // shift array 1 element to the right