pub struct ValueStatistics<T> { /* private fields */ }Expand description
Typed statistics for one column chunk
See Statistics for more details
Implementations§
Source§impl<T> ValueStatistics<T>
impl<T> ValueStatistics<T>
Sourcepub fn new(
min: Option<T>,
max: Option<T>,
distinct_count: Option<u64>,
null_count: Option<u64>,
is_min_max_deprecated: bool,
) -> Self
pub fn new( min: Option<T>, max: Option<T>, distinct_count: Option<u64>, null_count: Option<u64>, is_min_max_deprecated: bool, ) -> Self
Creates new typed statistics.
Sourcepub fn with_min_is_exact(self, is_min_value_exact: bool) -> Self
pub fn with_min_is_exact(self, is_min_value_exact: bool) -> Self
Set whether the stored min field represents the exact
minimum, or just a bound on the minimum value.
Sourcepub fn with_max_is_exact(self, is_max_value_exact: bool) -> Self
pub fn with_max_is_exact(self, is_max_value_exact: bool) -> Self
Set whether the stored max field represents the exact
maximum, or just a bound on the maximum value.
Sourcepub fn with_backwards_compatible_min_max(
self,
backwards_compatible: bool,
) -> Self
pub fn with_backwards_compatible_min_max( self, backwards_compatible: bool, ) -> Self
Set whether to write the deprecated min and max fields
for compatibility with older parquet writers
This should only be enabled if the field is signed,
see Self::is_min_max_backwards_compatible
Sourcepub fn max_is_exact(&self) -> bool
pub fn max_is_exact(&self) -> bool
Whether or not max value is set, and is an exact value.
Sourcepub fn min_is_exact(&self) -> bool
pub fn min_is_exact(&self) -> bool
Whether or not min value is set, and is an exact value.
Sourcepub fn distinct_count(&self) -> Option<u64>
pub fn distinct_count(&self) -> Option<u64>
Returns optional value of number of distinct values occurring.
Sourcepub fn null_count_opt(&self) -> Option<u64>
pub fn null_count_opt(&self) -> Option<u64>
Returns null count.
Sourcepub fn is_min_max_backwards_compatible(&self) -> bool
pub fn is_min_max_backwards_compatible(&self) -> bool
Old versions of parquet stored statistics in min and max fields, ordered
using signed comparison. This resulted in an undefined ordering for unsigned
quantities, such as booleans and unsigned integers.
These fields were therefore deprecated in favour of min_value and max_value,
which have a type-defined sort order.
However, not all readers have been updated. For backwards compatibility, this method
returns true if the statistics within this have a signed sort order, that is
compatible with being stored in the deprecated min and max fields
Source§impl<T: AsBytes> ValueStatistics<T>
impl<T: AsBytes> ValueStatistics<T>
Sourcepub fn min_bytes_opt(&self) -> Option<&[u8]>
pub fn min_bytes_opt(&self) -> Option<&[u8]>
Returns min value as bytes of the statistics, if min value is known.
Sourcepub fn max_bytes_opt(&self) -> Option<&[u8]>
pub fn max_bytes_opt(&self) -> Option<&[u8]>
Returns max value as bytes of the statistics, if max value is known.
Trait Implementations§
Source§impl<T: Clone> Clone for ValueStatistics<T>
impl<T: Clone> Clone for ValueStatistics<T>
Source§fn clone(&self) -> ValueStatistics<T>
fn clone(&self) -> ValueStatistics<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more