pub struct HistogramBucket {
pub lower_bound: String,
pub upper_bound: String,
pub count: u64,
pub distinct_count: u64,
pub null_count: u64,
}Expand description
A single bucket in an equi-depth histogram.
All values in the range [lower_bound, upper_bound] (lexicographic) fall into this bucket.
Fields§
§lower_bound: StringMinimum value in this bucket (inclusive, string-encoded).
upper_bound: StringMaximum value in this bucket (inclusive, string-encoded).
count: u64Approximate number of values (triples) whose object falls in this bucket.
distinct_count: u64Approximate number of distinct values in this bucket.
null_count: u64Number of null / missing values encountered when building this bucket.
Implementations§
Source§impl HistogramBucket
impl HistogramBucket
Sourcepub fn contains(&self, value: &str) -> bool
pub fn contains(&self, value: &str) -> bool
Returns true if value falls within the closed range [lower_bound, upper_bound].
Sourcepub fn overlap_fraction(&self, lo: &str, hi: &str) -> f64
pub fn overlap_fraction(&self, lo: &str, hi: &str) -> f64
Returns the fraction [0, 1] of the bucket that is “covered” by the closed range
[lo, hi]. Used for range selectivity estimation with linear interpolation.
Trait Implementations§
Source§impl Clone for HistogramBucket
impl Clone for HistogramBucket
Source§fn clone(&self) -> HistogramBucket
fn clone(&self) -> HistogramBucket
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 HistogramBucket
impl RefUnwindSafe for HistogramBucket
impl Send for HistogramBucket
impl Sync for HistogramBucket
impl Unpin for HistogramBucket
impl UnsafeUnpin for HistogramBucket
impl UnwindSafe for HistogramBucket
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 more