mz_persist_types::stats

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ColumnStats for BytesStats

Source§

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

Source§

impl ColumnStats for PrimitiveStats<bool>

Source§

type Ref<'a> = bool

Source§

impl ColumnStats for PrimitiveStats<f32>

Source§

type Ref<'a> = f32

Source§

impl ColumnStats for PrimitiveStats<f64>

Source§

type Ref<'a> = f64

Source§

impl ColumnStats for PrimitiveStats<i8>

Source§

type Ref<'a> = i8

Source§

impl ColumnStats for PrimitiveStats<i16>

Source§

type Ref<'a> = i16

Source§

impl ColumnStats for PrimitiveStats<i32>

Source§

type Ref<'a> = i32

Source§

impl ColumnStats for PrimitiveStats<i64>

Source§

type Ref<'a> = i64

Source§

impl ColumnStats for PrimitiveStats<u8>

Source§

type Ref<'a> = u8

Source§

impl ColumnStats for PrimitiveStats<u16>

Source§

type Ref<'a> = u16

Source§

impl ColumnStats for PrimitiveStats<u32>

Source§

type Ref<'a> = u32

Source§

impl ColumnStats for PrimitiveStats<u64>

Source§

type Ref<'a> = u64

Source§

impl ColumnStats for PrimitiveStats<String>

Source§

type Ref<'a> = &'a str

Source§

impl ColumnStats for NoneStats

Source§

type Ref<'a> = ()

Source§

impl ColumnStats for OptionStats<BytesStats>

Source§

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

Source§

impl ColumnStats for OptionStats<PrimitiveStats<bool>>

Source§

type Ref<'a> = Option<bool>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<f32>>

Source§

type Ref<'a> = Option<f32>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<f64>>

Source§

type Ref<'a> = Option<f64>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<i8>>

Source§

type Ref<'a> = Option<i8>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<i16>>

Source§

type Ref<'a> = Option<i16>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<i32>>

Source§

type Ref<'a> = Option<i32>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<i64>>

Source§

type Ref<'a> = Option<i64>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<u8>>

Source§

type Ref<'a> = Option<u8>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<u16>>

Source§

type Ref<'a> = Option<u16>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<u32>>

Source§

type Ref<'a> = Option<u32>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<u64>>

Source§

type Ref<'a> = Option<u64>

Source§

impl ColumnStats for OptionStats<PrimitiveStats<String>>

Source§

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

Source§

impl ColumnStats for OptionStats<NoneStats>

Source§

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

Source§

impl ColumnStats for OptionStats<StructStats>

Source§

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

Source§

impl ColumnStats for StructStats

Source§

type Ref<'a> = ()