pub struct StreamingStatistics {
pub count: usize,
pub null_count: usize,
pub min: f64,
pub max: f64,
/* private fields */
}Fields§
§count: usize§null_count: usize§min: f64§max: f64Implementations§
Source§impl StreamingStatistics
impl StreamingStatistics
pub fn new() -> Self
pub fn with_sample_capacity(max_sample: usize) -> Self
pub fn update(&mut self, value: &str)
pub fn merge(&mut self, other: &StreamingStatistics)
pub fn mean(&self) -> f64
pub fn variance(&self) -> f64
pub fn std_dev(&self) -> f64
Sourcepub fn unique_count(&self) -> usize
pub fn unique_count(&self) -> usize
Distinct non-null values, exact until the estimator spills.
This used to count the reservoir when it held every value and fall back to a sketch otherwise, so any column longer than the reservoir, even one with a single value, reported an approximate count, and a different one from the engines that use the shared estimator.
pub fn unique_count_is_approximate(&self) -> bool
Sourcepub fn unique_count_lower_bound(&self) -> usize
pub fn unique_count_lower_bound(&self) -> usize
Sourcepub fn spill_distinct(&mut self)
pub fn spill_distinct(&mut self)
Answer distinct counts from the sketch from here on, freeing the exact set. For memory pressure; the count is then reported approximate.
Sourcepub fn exact_distinct_bytes(&self) -> usize
pub fn exact_distinct_bytes(&self) -> usize
Heap held by the exact distinct set: zero once it has spilled, and zero for a column that has seen no value, so spilling it would free nothing.
pub fn sample_values(&self) -> &[String]
Sourcepub fn date_match_count(&self) -> usize
pub fn date_match_count(&self) -> usize
Values over the full stream accepted by the temporal calculator.
Sourcepub fn exact_numeric_aggregates(&self) -> Option<ExactNumericAggregates>
pub fn exact_numeric_aggregates(&self) -> Option<ExactNumericAggregates>
Exact aggregates over every numeric value this column has streamed,
or None when no value parsed as a finite number.
These come from the O(1)-memory min/max fields and the Welford accumulator, so they cover the full stream even when the reservoir sample no longer does.