pub struct ColumnStats {
pub null_frac: f32,
pub n_distinct: u64,
pub histogram_bounds: Vec<String>,
}Expand description
Per-column statistics computed by ANALYZE. See module docs.
Fields§
§null_frac: f32Fraction of NULL rows. [0.0, 1.0].
n_distinct: u64Raw distinct-value count (linear-counting estimate; PG stores a similar approximation. v6.2.x can re-tune the sketch — the value semantic is “approximate ≥ 0.95 accuracy on skewed corpora”).
histogram_bounds: Vec<String>101 sorted bounds → 100 equi-depth buckets. Bucket i
spans values in [bounds[i], bounds[i+1]) for i < 99,
and [bounds[99], bounds[100]] for the final bucket.
Bounds are the canonical SQL textual form of the column’s
values — TEXT lexicographic, INT decimal, FLOAT
shortest-round-trip, DATE/TIMESTAMP ISO. Empty for an
all-NULL column.
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnStats
impl Debug for ColumnStats
Source§impl PartialEq for ColumnStats
impl PartialEq for ColumnStats
Source§fn eq(&self, other: &ColumnStats) -> bool
fn eq(&self, other: &ColumnStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ColumnStats
Auto Trait Implementations§
impl Freeze for ColumnStats
impl RefUnwindSafe for ColumnStats
impl Send for ColumnStats
impl Sync for ColumnStats
impl Unpin for ColumnStats
impl UnsafeUnpin 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