ParquetMetaDataOptions

Struct ParquetMetaDataOptions 

Source
pub struct ParquetMetaDataOptions {
    schema_descr: Option<SchemaDescPtr>,
    encoding_stats_as_mask: bool,
    encoding_stats_policy: ParquetStatisticsPolicy,
}
Expand description

Options that can be set to control what parts of the Parquet file footer metadata will be decoded and made present in the ParquetMetaData returned by ParquetMetaDataReader and ParquetMetaDataPushDecoder.

Fields§

§schema_descr: Option<SchemaDescPtr>§encoding_stats_as_mask: bool§encoding_stats_policy: ParquetStatisticsPolicy

Implementations§

Source§

impl ParquetMetaDataOptions

Source

pub fn new() -> Self

Return a new default ParquetMetaDataOptions.

Source

pub fn schema(&self) -> Option<&SchemaDescPtr>

Returns an optional SchemaDescPtr to use when decoding. If this is not None then the schema in the footer will be skipped.

Source

pub fn set_schema(&mut self, val: SchemaDescPtr)

Provide a schema to use when decoding the metadata.

Source

pub fn with_schema(self, val: SchemaDescPtr) -> Self

Call Self::set_schema and return Self for chaining.

Source

pub fn encoding_stats_as_mask(&self) -> bool

Returns whether to present the encoding_stats field of the Parquet ColumnMetaData as a bitmask (defaults to false).

See ColumnChunkMetaData::page_encoding_stats_mask for an explanation of why this might be desirable.

Source

pub fn set_encoding_stats_as_mask(&mut self, val: bool)

Convert encoding_stats from a vector of PageEncodingStats to a bitmask. This can speed up metadata decoding while still enabling some use cases served by the full stats.

Note that if for a given column both this option and skip_encoding_stats are true, the stats will be skipped and not be returned as a mask.

See ColumnChunkMetaData::page_encoding_stats_mask for more information.

Source

pub fn with_encoding_stats_as_mask(self, val: bool) -> Self

Call Self::set_encoding_stats_as_mask and return Self for chaining.

Source

pub fn skip_encoding_stats(&self, col_index: usize) -> bool

Returns whether to skip decoding the encoding_stats in the Parquet ColumnMetaData for the column indexed by col_index.

Source

pub fn set_encoding_stats_policy(&mut self, policy: ParquetStatisticsPolicy)

Sets the decoding policy for encoding_stats in the Parquet ColumnMetaData.

The default policy is to decode all encoding_stats.

This option takes precedence over Self::encoding_stats_as_mask.

Source

pub fn with_encoding_stats_policy(self, policy: ParquetStatisticsPolicy) -> Self

Call Self::set_encoding_stats_policy and return Self for chaining.

Trait Implementations§

Source§

impl Clone for ParquetMetaDataOptions

Source§

fn clone(&self) -> ParquetMetaDataOptions

Returns a duplicate 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 Debug for ParquetMetaDataOptions

Source§

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

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

impl Default for ParquetMetaDataOptions

Source§

fn default() -> ParquetMetaDataOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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

§

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