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§

source

type ArrowColumn: Array + 'static

Type of arrow column these statistics can be derived from.

source

type FinishedStats: DynStats

The type of statistics the collector finalizes into.

Required Methods§

source

fn from_column(col: &Self::ArrowColumn) -> Self
where Self: Sized,

Derive statistics from a column of data.

source

fn finish(self) -> Self::FinishedStats
where Self::FinishedStats: Sized,

Finish this collector returning the final aggregated statistics.

Provided Methods§

source

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.

Implementors§

source§

impl ColumnarStatsBuilder<&str> for PrimitiveStats<String>

source§

impl ColumnarStatsBuilder<&[u8]> for PrimitiveStats<Vec<u8>>

source§

impl ColumnarStatsBuilder<bool> for PrimitiveStats<bool>

source§

impl ColumnarStatsBuilder<f32> for PrimitiveStats<f32>

source§

impl ColumnarStatsBuilder<f64> for PrimitiveStats<f64>

source§

impl ColumnarStatsBuilder<i8> for PrimitiveStats<i8>

source§

impl ColumnarStatsBuilder<i16> for PrimitiveStats<i16>

source§

impl ColumnarStatsBuilder<i32> for PrimitiveStats<i32>

source§

impl ColumnarStatsBuilder<i64> for PrimitiveStats<i64>

source§

impl ColumnarStatsBuilder<u8> for PrimitiveStats<u8>

source§

impl ColumnarStatsBuilder<u16> for PrimitiveStats<u16>

source§

impl ColumnarStatsBuilder<u32> for PrimitiveStats<u32>

source§

impl ColumnarStatsBuilder<u64> for PrimitiveStats<u64>

source§

impl<I, T> ColumnarStatsBuilder<Option<I>> for OptionStats<T>

source§

impl<T, A: Array + 'static> ColumnarStatsBuilder<T> for NoneStatsBuilder<A>