pub struct ColumnStats {
pub distinct_count: u64,
pub null_count: u64,
pub min_value: Option<f64>,
pub max_value: Option<f64>,
pub histogram: Option<EquiDepthHistogram>,
}Expand description
Statistics for a column.
Fields§
§distinct_count: u64Number of distinct values.
null_count: u64Number of null values.
min_value: Option<f64>Minimum value (if orderable).
max_value: Option<f64>Maximum value (if orderable).
histogram: Option<EquiDepthHistogram>Equi-depth histogram for accurate selectivity estimation.
Implementations§
Source§impl ColumnStats
impl ColumnStats
Sourcepub fn with_nulls(self, null_count: u64) -> Self
pub fn with_nulls(self, null_count: u64) -> Self
Sets the null count.
Sourcepub fn with_range(self, min: f64, max: f64) -> Self
pub fn with_range(self, min: f64, max: f64) -> Self
Sets the min/max range.
Sourcepub fn with_histogram(self, histogram: EquiDepthHistogram) -> Self
pub fn with_histogram(self, histogram: EquiDepthHistogram) -> Self
Sets the equi-depth histogram for this column.
Sourcepub fn from_values(values: Vec<f64>, num_buckets: usize) -> Self
pub fn from_values(values: Vec<f64>, num_buckets: usize) -> Self
Builds column statistics with histogram from raw values.
This is a convenience method that computes all statistics from the data.
§Arguments
values- The column values (will be sorted internally)num_buckets- Number of histogram buckets to create
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