parquet::file::statistics

Struct ValueStatistics

Source
pub struct ValueStatistics<T> {
    min: Option<T>,
    max: Option<T>,
    distinct_count: Option<u64>,
    null_count: Option<u64>,
    is_max_value_exact: bool,
    is_min_value_exact: bool,
    is_min_max_deprecated: bool,
    is_min_max_backwards_compatible: bool,
}
Expand description

Typed statistics for one column chunk

See Statistics for more details

Fields§

§min: Option<T>§max: Option<T>§distinct_count: Option<u64>§null_count: Option<u64>§is_max_value_exact: bool§is_min_value_exact: bool§is_min_max_deprecated: bool

If true populate the deprecated min and max fields instead of min_value and max_value

§is_min_max_backwards_compatible: bool

If true the statistics are compatible with the deprecated min and max fields. See ValueStatistics::is_min_max_backwards_compatible

Implementations§

Source§

impl<T: ParquetValueType> ValueStatistics<T>

Source

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.

Source

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.

see Self::min_is_exact

Source

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.

see Self::max_is_exact

Source

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

Source

pub fn min(&self) -> &T

👎Deprecated since 53.0.0: Use min_opt instead

Returns min value of the statistics.

Panics if min value is not set, e.g. all values are null. Use has_min_max_set method to check that.

Source

pub fn min_opt(&self) -> Option<&T>

Returns min value of the statistics, if known.

Source

pub fn max(&self) -> &T

👎Deprecated since 53.0.0: Use max_opt instead

Returns max value of the statistics.

Panics if max value is not set, e.g. all values are null. Use has_min_max_set method to check that.

Source

pub fn max_opt(&self) -> Option<&T>

Returns max value of the statistics, if known.

Source

pub fn min_bytes_opt(&self) -> Option<&[u8]>

Returns min value as bytes of the statistics, if min value is known.

Source

pub fn min_bytes(&self) -> &[u8]

👎Deprecated since 53.0.0: Use min_bytes_opt instead

Returns min value as bytes of the statistics.

Panics if min value is not set, use has_min_max_set method to check if values are set.

Source

pub fn max_bytes_opt(&self) -> Option<&[u8]>

Returns max value as bytes of the statistics, if max value is known.

Source

pub fn max_bytes(&self) -> &[u8]

👎Deprecated since 53.0.0: Use max_bytes_opt instead

Returns max value as bytes of the statistics.

Panics if max value is not set, use has_min_max_set method to check if values are set.

Source

pub fn has_min_max_set(&self) -> bool

👎Deprecated since 53.0.0: Use min_opt and max_opt methods instead

Whether or not min and max values are set. Normally both min/max values will be set to Some(value) or None.

Source

pub(crate) fn _internal_has_min_max_set(&self) -> bool

Whether or not min and max values are set. Normally both min/max values will be set to Some(value) or None.

Source

pub fn max_is_exact(&self) -> bool

Whether or not max value is set, and is an exact value.

Source

pub fn min_is_exact(&self) -> bool

Whether or not min value is set, and is an exact value.

Source

pub fn distinct_count(&self) -> Option<u64>

Returns optional value of number of distinct values occurring.

Source

pub fn null_count(&self) -> u64

👎Deprecated since 53.0.0: Use null_count_opt method instead

Returns number of null values for the column. Note that this includes all nulls when column is part of the complex type.

Source

pub fn null_count_opt(&self) -> Option<u64>

Returns null count.

Source

fn is_min_max_deprecated(&self) -> bool

Returns true if statistics were created using old min/max fields.

Source

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

Trait Implementations§

Source§

impl<T: Clone> Clone for ValueStatistics<T>

Source§

fn clone(&self) -> ValueStatistics<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: ParquetValueType> Debug for ValueStatistics<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ParquetValueType> Display for ValueStatistics<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: ParquetValueType> From<ValueStatistics<T>> for Statistics

Source§

fn from(t: ValueStatistics<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: ParquetValueType> HeapSize for ValueStatistics<T>

Source§

fn heap_size(&self) -> usize

Return the size of any bytes allocated on the heap by this object, including heap memory in those structures Read more
Source§

impl<T: PartialEq> PartialEq for ValueStatistics<T>

Source§

fn eq(&self, other: &ValueStatistics<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Eq> Eq for ValueStatistics<T>

Source§

impl<T> StructuralPartialEq for ValueStatistics<T>

Auto Trait Implementations§

§

impl<T> Freeze for ValueStatistics<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for ValueStatistics<T>
where T: RefUnwindSafe,

§

impl<T> Send for ValueStatistics<T>
where T: Send,

§

impl<T> Sync for ValueStatistics<T>
where T: Sync,

§

impl<T> Unpin for ValueStatistics<T>
where T: Unpin,

§

impl<T> UnwindSafe for ValueStatistics<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T