From 501587871442486f64b92aae4d92789457d18ffd Mon Sep 17 00:00:00 2001 From: Eduard Akhmetshin Date: Mon, 29 Dec 2025 20:14:09 +0000 Subject: [PATCH 1/2] Fix headers and empty lines --- arrow-arith/src/aggregate.rs | 8 ++++---- arrow-ord/src/sort.rs | 5 ++--- arrow-select/src/take.rs | 3 +-- arrow-select/src/window.rs | 3 +-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/arrow-arith/src/aggregate.rs b/arrow-arith/src/aggregate.rs index 91623bc22b92..55fb9e33fbc8 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 +/// ```rust /// # 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 +/// ```rust /// # 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..b9ad29845bcc 100644 --- a/arrow-ord/src/sort.rs +++ b/arrow-ord/src/sort.rs @@ -846,16 +846,15 @@ 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: /// -/// ``` +/// ```rust /// # use std::convert::From; /// # use std::sync::Arc; /// # use arrow_array::{ArrayRef, StringArray, PrimitiveArray}; /// # 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..8c80e9ef1ea4 100644 --- a/arrow-select/src/take.rs +++ b/arrow-select/src/take.rs @@ -1006,12 +1006,11 @@ to_indices_reinterpret!(Int64Type, UInt64Type); /// This function will call [`take`] on each array of the [`RecordBatch`] and assemble a new [`RecordBatch`]. /// /// # Example -/// ``` +/// ```rust /// # use std::sync::Arc; /// # 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..0d3245995c22 100644 --- a/arrow-select/src/window.rs +++ b/arrow-select/src/window.rs @@ -26,10 +26,9 @@ use num_traits::abs; /// A positive value for `offset` shifts the array to the right /// a negative value shifts the array to the left. /// # Examples -/// ``` +/// ```rust /// # 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 From b81db86d7fc28849fec521eaa5c5f7150838cf80 Mon Sep 17 00:00:00 2001 From: Eduard Akhmetshin Date: Tue, 30 Dec 2025 20:42:17 +0000 Subject: [PATCH 2/2] Remove rust tags --- arrow-arith/src/aggregate.rs | 4 ++-- arrow-ord/src/sort.rs | 2 +- arrow-select/src/take.rs | 2 +- arrow-select/src/window.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arrow-arith/src/aggregate.rs b/arrow-arith/src/aggregate.rs index 55fb9e33fbc8..92f880c7149a 100644 --- a/arrow-arith/src/aggregate.rs +++ b/arrow-arith/src/aggregate.rs @@ -333,7 +333,7 @@ fn aggregate, A: Numeric /// Returns the minimum value in the boolean array. /// /// # Example -/// ```rust +/// ``` /// # use arrow_array::BooleanArray; /// # use arrow_arith::aggregate::min_boolean; /// let a = BooleanArray::from(vec![Some(true), None, Some(false)]); @@ -391,7 +391,7 @@ pub fn min_boolean(array: &BooleanArray) -> Option { /// Returns the maximum value in the boolean array /// /// # Example -/// ```rust +/// ``` /// # use arrow_array::BooleanArray; /// # use arrow_arith::aggregate::max_boolean; /// let a = BooleanArray::from(vec![Some(true), None, Some(false)]); diff --git a/arrow-ord/src/sort.rs b/arrow-ord/src/sort.rs index b9ad29845bcc..39d56f8fe9b2 100644 --- a/arrow-ord/src/sort.rs +++ b/arrow-ord/src/sort.rs @@ -848,7 +848,7 @@ pub struct SortColumn { /// /// # Example: /// -/// ```rust +/// ``` /// # use std::convert::From; /// # use std::sync::Arc; /// # use arrow_array::{ArrayRef, StringArray, PrimitiveArray}; diff --git a/arrow-select/src/take.rs b/arrow-select/src/take.rs index 8c80e9ef1ea4..1961a604d928 100644 --- a/arrow-select/src/take.rs +++ b/arrow-select/src/take.rs @@ -1006,7 +1006,7 @@ to_indices_reinterpret!(Int64Type, UInt64Type); /// This function will call [`take`] on each array of the [`RecordBatch`] and assemble a new [`RecordBatch`]. /// /// # Example -/// ```rust +/// ``` /// # use std::sync::Arc; /// # use arrow_array::{StringArray, Int32Array, UInt32Array, RecordBatch}; /// # use arrow_schema::{DataType, Field, Schema}; diff --git a/arrow-select/src/window.rs b/arrow-select/src/window.rs index 0d3245995c22..74f7f4a79191 100644 --- a/arrow-select/src/window.rs +++ b/arrow-select/src/window.rs @@ -26,7 +26,7 @@ use num_traits::abs; /// A positive value for `offset` shifts the array to the right /// a negative value shifts the array to the left. /// # Examples -/// ```rust +/// ``` /// # use arrow_array::Int32Array; /// # use arrow_select::window::shift; /// let a: Int32Array = vec![Some(1), None, Some(4)].into();