diff --git a/datafusion/core/src/physical_optimizer/pruning.rs b/datafusion/core/src/physical_optimizer/pruning.rs index 19e71a92a706..dc7e0529decb 100644 --- a/datafusion/core/src/physical_optimizer/pruning.rs +++ b/datafusion/core/src/physical_optimizer/pruning.rs @@ -105,19 +105,23 @@ pub trait PruningStatistics { fn num_containers(&self) -> usize; /// Return the number of null values for the named column as an - /// `Option`. + /// [`UInt64Array`] /// /// See [`Self::min_values`] for when to return `None` and null values. /// /// Note: the returned array must contain [`Self::num_containers`] rows + /// + /// [`UInt64Array`]: arrow::array::UInt64Array fn null_counts(&self, column: &Column) -> Option; /// Return the number of rows for the named column in each container - /// as an `Option`. + /// as an [`UInt64Array`]. /// /// See [`Self::min_values`] for when to return `None` and null values. /// /// Note: the returned array must contain [`Self::num_containers`] rows + /// + /// [`UInt64Array`]: arrow::array::UInt64Array fn row_counts(&self, column: &Column) -> Option; /// Returns [`BooleanArray`] where each row represents information known @@ -1519,6 +1523,7 @@ mod tests { array::{BinaryArray, Int32Array, Int64Array, StringArray}, datatypes::{DataType, TimeUnit}, }; + use arrow_array::UInt64Array; use datafusion_common::{ScalarValue, ToDFSchema}; use datafusion_expr::execution_props::ExecutionProps; use datafusion_expr::expr::InList; @@ -1684,10 +1689,10 @@ mod tests { /// there are containers fn with_null_counts( mut self, - counts: impl IntoIterator>, + counts: impl IntoIterator>, ) -> Self { let null_counts: ArrayRef = - Arc::new(counts.into_iter().collect::()); + Arc::new(counts.into_iter().collect::()); self.assert_invariants(); self.null_counts = Some(null_counts); @@ -1698,10 +1703,10 @@ mod tests { /// there are containers fn with_row_counts( mut self, - counts: impl IntoIterator>, + counts: impl IntoIterator>, ) -> Self { let row_counts: ArrayRef = - Arc::new(counts.into_iter().collect::()); + Arc::new(counts.into_iter().collect::()); self.assert_invariants(); self.row_counts = Some(row_counts); @@ -1753,13 +1758,13 @@ mod tests { self } - /// Add null counts for the specified columm. + /// Add null counts for the specified column. /// There must be the same number of null counts as /// there are containers fn with_null_counts( mut self, name: impl Into, - counts: impl IntoIterator>, + counts: impl IntoIterator>, ) -> Self { let col = Column::from_name(name.into()); @@ -1775,13 +1780,13 @@ mod tests { self } - /// Add row counts for the specified columm. + /// Add row counts for the specified column. /// There must be the same number of row counts as /// there are containers fn with_row_counts( mut self, name: impl Into, - counts: impl IntoIterator>, + counts: impl IntoIterator>, ) -> Self { let col = Column::from_name(name.into()); @@ -1797,7 +1802,7 @@ mod tests { self } - /// Add contained information for the specified columm. + /// Add contained information for the specified column. fn with_contained( mut self, name: impl Into,