Trait mz_persist_types::stats::ColumnStats
source · pub trait ColumnStats<T: Data>: DynStats {
// Required methods
fn lower<'a>(&'a self) -> Option<T::Ref<'a>>;
fn upper<'a>(&'a self) -> Option<T::Ref<'a>>;
fn none_count(&self) -> usize;
fn downcast(stats: &ColumnarStats) -> Option<Self>
where Self: Sized;
}
Expand description
Aggregate statistics about a column of type T
.
Required Methods§
sourcefn lower<'a>(&'a self) -> Option<T::Ref<'a>>
fn lower<'a>(&'a self) -> Option<T::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).
sourcefn upper<'a>(&'a self) -> Option<T::Ref<'a>>
fn upper<'a>(&'a self) -> Option<T::Ref<'a>>
Same as Self::lower but an (also inclusive) upper bound.
sourcefn none_count(&self) -> usize
fn none_count(&self) -> usize
The number of None
s if this column is optional or 0 if it isn’t.
sourcefn downcast(stats: &ColumnarStats) -> Option<Self>where
Self: Sized,
fn downcast(stats: &ColumnarStats) -> Option<Self>where
Self: Sized,
Downcast an instance of ColumnarStats
into Self
, if
ColumnarStats
contains Self
.
Note: This method is intended to help bridge the gap between Data
and crate::columnar::Schema2
.