pub struct ColumnStatistics {
pub null_count: Precision<usize>,
pub max_value: Precision<ScalarValue>,
pub min_value: Precision<ScalarValue>,
pub sum_value: Precision<ScalarValue>,
pub distinct_count: Precision<usize>,
pub byte_size: Precision<usize>,
}Expand description
Statistics for a column within a relation
Fields§
§null_count: Precision<usize>Number of null values on column
max_value: Precision<ScalarValue>Maximum value of column
min_value: Precision<ScalarValue>Minimum value of column
sum_value: Precision<ScalarValue>Sum value of a column
distinct_count: Precision<usize>Number of distinct values
byte_size: Precision<usize>Estimated size of this column’s data in bytes for the output.
Note that this is not the same as the total bytes that may be scanned, processed, etc.
E.g. we may read 1GB of data from a Parquet file but the Arrow data the node produces may be 2GB; it’s this 2GB that is tracked here.
Currently this is accurately calculated for primitive types only. For complex types (like Utf8, List, Struct, etc), this value may be absent or inexact (e.g. estimated from the size of the data in the source Parquet files).
This value is automatically scaled when operations like limits or
filters reduce the number of rows (see Statistics::with_fetch).
Implementations§
Source§impl ColumnStatistics
impl ColumnStatistics
Sourcepub fn is_singleton(&self) -> bool
pub fn is_singleton(&self) -> bool
Column contains a single non null value (e.g constant).
Sourcepub fn new_unknown() -> Self
pub fn new_unknown() -> Self
Returns a ColumnStatistics instance having all Precision::Absent parameters.
Sourcepub fn with_null_count(self, null_count: Precision<usize>) -> Self
pub fn with_null_count(self, null_count: Precision<usize>) -> Self
Set the null count
Sourcepub fn with_max_value(self, max_value: Precision<ScalarValue>) -> Self
pub fn with_max_value(self, max_value: Precision<ScalarValue>) -> Self
Set the max value
Sourcepub fn with_min_value(self, min_value: Precision<ScalarValue>) -> Self
pub fn with_min_value(self, min_value: Precision<ScalarValue>) -> Self
Set the min value
Sourcepub fn with_sum_value(self, sum_value: Precision<ScalarValue>) -> Self
pub fn with_sum_value(self, sum_value: Precision<ScalarValue>) -> Self
Set the sum value
Sourcepub fn with_distinct_count(self, distinct_count: Precision<usize>) -> Self
pub fn with_distinct_count(self, distinct_count: Precision<usize>) -> Self
Set the distinct count
Sourcepub fn with_byte_size(self, byte_size: Precision<usize>) -> Self
pub fn with_byte_size(self, byte_size: Precision<usize>) -> Self
Set the scan byte size This should initially be set to the total size of the column.
Sourcepub fn to_inexact(self) -> Self
pub fn to_inexact(self) -> Self
If the exactness of a ColumnStatistics instance is lost, this
function relaxes the exactness of all information by converting them
Precision::Inexact.
Trait Implementations§
Source§impl Clone for ColumnStatistics
impl Clone for ColumnStatistics
Source§fn clone(&self) -> ColumnStatistics
fn clone(&self) -> ColumnStatistics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ColumnStatistics
impl Debug for ColumnStatistics
Source§impl Default for ColumnStatistics
impl Default for ColumnStatistics
Source§fn default() -> ColumnStatistics
fn default() -> ColumnStatistics
Source§impl PartialEq for ColumnStatistics
impl PartialEq for ColumnStatistics
impl Eq for ColumnStatistics
impl StructuralPartialEq for ColumnStatistics
Auto Trait Implementations§
impl Freeze for ColumnStatistics
impl !RefUnwindSafe for ColumnStatistics
impl Send for ColumnStatistics
impl Sync for ColumnStatistics
impl Unpin for ColumnStatistics
impl !UnwindSafe for ColumnStatistics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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