Trait mz_persist_types::stats::ColumnStats

source ·
pub trait ColumnStats: DynStats {
    type Ref<'a>
       where Self: 'a;

    // Required methods
    fn lower<'a>(&'a self) -> Option<Self::Ref<'a>>;
    fn upper<'a>(&'a self) -> Option<Self::Ref<'a>>;
    fn none_count(&self) -> usize;
}
Expand description

Aggregate statistics about a column of type T.

Required Associated Types§

source

type Ref<'a> where Self: 'a

Type returned as the stat bounds.

Required Methods§

source

fn lower<'a>(&'a self) -> Option<Self::Ref<'a>>

An inclusive lower bound on the data contained in the column, if known.

This will often be a tight bound, but it’s not guaranteed. Persist reserves the right to (for example) invent smaller bounds for long byte strings. SUBTLE: This means that this exact value may not be present in the column.

Similarly, if the column is empty, this will contain T: Default. Emptiness will be indicated in statistics higher up (i.e. StructStats).

source

fn upper<'a>(&'a self) -> Option<Self::Ref<'a>>

Same as Self::lower but an (also inclusive) upper bound.

source

fn none_count(&self) -> usize

The number of Nones if this column is optional or 0 if it isn’t.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ColumnStats for BytesStats

§

type Ref<'a> = &'a [u8]

source§

impl ColumnStats for PrimitiveStats<bool>

§

type Ref<'a> = bool

source§

impl ColumnStats for PrimitiveStats<f32>

§

type Ref<'a> = f32

source§

impl ColumnStats for PrimitiveStats<f64>

§

type Ref<'a> = f64

source§

impl ColumnStats for PrimitiveStats<i8>

§

type Ref<'a> = i8

source§

impl ColumnStats for PrimitiveStats<i16>

§

type Ref<'a> = i16

source§

impl ColumnStats for PrimitiveStats<i32>

§

type Ref<'a> = i32

source§

impl ColumnStats for PrimitiveStats<i64>

§

type Ref<'a> = i64

source§

impl ColumnStats for PrimitiveStats<u8>

§

type Ref<'a> = u8

source§

impl ColumnStats for PrimitiveStats<u16>

§

type Ref<'a> = u16

source§

impl ColumnStats for PrimitiveStats<u32>

§

type Ref<'a> = u32

source§

impl ColumnStats for PrimitiveStats<u64>

§

type Ref<'a> = u64

source§

impl ColumnStats for PrimitiveStats<String>

§

type Ref<'a> = &'a str

source§

impl ColumnStats for NoneStats

§

type Ref<'a> = ()

source§

impl ColumnStats for OptionStats<BytesStats>

§

type Ref<'a> = Option<&'a [u8]>

source§

impl ColumnStats for OptionStats<PrimitiveStats<bool>>

§

type Ref<'a> = Option<bool>

source§

impl ColumnStats for OptionStats<PrimitiveStats<f32>>

§

type Ref<'a> = Option<f32>

source§

impl ColumnStats for OptionStats<PrimitiveStats<f64>>

§

type Ref<'a> = Option<f64>

source§

impl ColumnStats for OptionStats<PrimitiveStats<i8>>

§

type Ref<'a> = Option<i8>

source§

impl ColumnStats for OptionStats<PrimitiveStats<i16>>

§

type Ref<'a> = Option<i16>

source§

impl ColumnStats for OptionStats<PrimitiveStats<i32>>

§

type Ref<'a> = Option<i32>

source§

impl ColumnStats for OptionStats<PrimitiveStats<i64>>

§

type Ref<'a> = Option<i64>

source§

impl ColumnStats for OptionStats<PrimitiveStats<u8>>

§

type Ref<'a> = Option<u8>

source§

impl ColumnStats for OptionStats<PrimitiveStats<u16>>

§

type Ref<'a> = Option<u16>

source§

impl ColumnStats for OptionStats<PrimitiveStats<u32>>

§

type Ref<'a> = Option<u32>

source§

impl ColumnStats for OptionStats<PrimitiveStats<u64>>

§

type Ref<'a> = Option<u64>

source§

impl ColumnStats for OptionStats<PrimitiveStats<String>>

§

type Ref<'a> = Option<&'a str>

source§

impl ColumnStats for OptionStats<NoneStats>

§

type Ref<'a> = Option<()>

source§

impl ColumnStats for OptionStats<StructStats>

§

type Ref<'a> = Option<()>

source§

impl ColumnStats for StructStats

§

type Ref<'a> = ()