mz_persist_types::stats2

Trait 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>