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: ParquetStatisticsPolicyImplementations§
Source§impl ParquetMetaDataOptions
impl ParquetMetaDataOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Return a new default ParquetMetaDataOptions.
Sourcepub fn schema(&self) -> Option<&SchemaDescPtr>
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.
Sourcepub fn set_schema(&mut self, val: SchemaDescPtr)
pub fn set_schema(&mut self, val: SchemaDescPtr)
Provide a schema to use when decoding the metadata.
Sourcepub fn with_schema(self, val: SchemaDescPtr) -> Self
pub fn with_schema(self, val: SchemaDescPtr) -> Self
Call Self::set_schema and return Self for chaining.
Sourcepub fn encoding_stats_as_mask(&self) -> bool
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.
Sourcepub fn set_encoding_stats_as_mask(&mut self, val: bool)
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.
Sourcepub fn with_encoding_stats_as_mask(self, val: bool) -> Self
pub fn with_encoding_stats_as_mask(self, val: bool) -> Self
Call Self::set_encoding_stats_as_mask and return Self for chaining.
Sourcepub fn skip_encoding_stats(&self, col_index: usize) -> bool
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.
Sourcepub fn set_encoding_stats_policy(&mut self, policy: ParquetStatisticsPolicy)
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.
Sourcepub fn with_encoding_stats_policy(self, policy: ParquetStatisticsPolicy) -> Self
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
impl Clone for ParquetMetaDataOptions
Source§fn clone(&self) -> ParquetMetaDataOptions
fn clone(&self) -> ParquetMetaDataOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParquetMetaDataOptions
impl Debug for ParquetMetaDataOptions
Source§impl Default for ParquetMetaDataOptions
impl Default for ParquetMetaDataOptions
Source§fn default() -> ParquetMetaDataOptions
fn default() -> ParquetMetaDataOptions
Auto Trait Implementations§
impl Freeze for ParquetMetaDataOptions
impl RefUnwindSafe for ParquetMetaDataOptions
impl Send for ParquetMetaDataOptions
impl Sync for ParquetMetaDataOptions
impl Unpin for ParquetMetaDataOptions
impl UnwindSafe for ParquetMetaDataOptions
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<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