pub struct ColumnStats {
pub ndv: usize,
pub null_count: usize,
pub min_value: Option<ColumnValue>,
pub max_value: Option<ColumnValue>,
pub histogram: Option<Histogram>,
pub mcv: Vec<(ColumnValue, usize)>,
}Expand description
Column-level statistics
Fields§
§ndv: usizeNumber of distinct values
null_count: usizeNumber of null values
min_value: Option<ColumnValue>Minimum value (for ordered types)
max_value: Option<ColumnValue>Maximum value (for ordered types)
histogram: Option<Histogram>Histogram for distribution
mcv: Vec<(ColumnValue, usize)>Most common values and their frequencies
Implementations§
Source§impl ColumnStats
impl ColumnStats
Sourcepub fn with_range(self, min: ColumnValue, max: ColumnValue) -> Self
pub fn with_range(self, min: ColumnValue, max: ColumnValue) -> Self
Set min/max values
Sourcepub fn with_histogram(self, histogram: Histogram) -> Self
pub fn with_histogram(self, histogram: Histogram) -> Self
Set histogram
Sourcepub fn with_mcv(self, mcv: Vec<(ColumnValue, usize)>) -> Self
pub fn with_mcv(self, mcv: Vec<(ColumnValue, usize)>) -> Self
Set most common values
Sourcepub fn estimate_equality_selectivity(&self, value: &ColumnValue) -> f64
pub fn estimate_equality_selectivity(&self, value: &ColumnValue) -> f64
Estimate selectivity for equality predicate
Sourcepub fn estimate_range_selectivity(
&self,
start: &ColumnValue,
end: &ColumnValue,
) -> f64
pub fn estimate_range_selectivity( &self, start: &ColumnValue, end: &ColumnValue, ) -> f64
Estimate selectivity for range predicate
Trait Implementations§
Source§impl Clone for ColumnStats
impl Clone for ColumnStats
Source§fn clone(&self) -> ColumnStats
fn clone(&self) -> ColumnStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ColumnStats
impl RefUnwindSafe for ColumnStats
impl Send for ColumnStats
impl Sync for ColumnStats
impl Unpin for ColumnStats
impl UnwindSafe for ColumnStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request