Trait mz_persist_types::stats2::ColumnarStatsBuilder
source · pub trait ColumnarStatsBuilder<T>: Debug {
type ArrowColumn: Array + 'static;
type FinishedStats: DynStats;
// Required methods
fn from_column(col: &Self::ArrowColumn) -> Self
where Self: Sized;
fn finish(self) -> Self::FinishedStats
where Self::FinishedStats: Sized;
// Provided method
fn from_column_dyn(col: &dyn Array) -> Option<Self>
where Self: Sized { ... }
}
Expand description
A type that can incrementally collect stats from a sequence of values.
Required Associated Types§
sourcetype ArrowColumn: Array + 'static
type ArrowColumn: Array + 'static
Type of arrow
column these statistics can be derived from.
sourcetype FinishedStats: DynStats
type FinishedStats: DynStats
The type of statistics the collector finalizes into.
Required Methods§
sourcefn from_column(col: &Self::ArrowColumn) -> Selfwhere
Self: Sized,
fn from_column(col: &Self::ArrowColumn) -> Selfwhere
Self: Sized,
Derive statistics from a column of data.
sourcefn finish(self) -> Self::FinishedStatswhere
Self::FinishedStats: Sized,
fn finish(self) -> Self::FinishedStatswhere
Self::FinishedStats: Sized,
Finish this collector returning the final aggregated statistics.
Provided Methods§
sourcefn from_column_dyn(col: &dyn Array) -> Option<Self>where
Self: Sized,
fn from_column_dyn(col: &dyn Array) -> Option<Self>where
Self: Sized,
Derive statistics from an opaque column of data.
Returns None
if the opaque column is not the same type as
Self::ArrowColumn
.