pub enum ParquetStatisticsPolicy {
KeepAll,
SkipAll,
SkipExcept(Arc<HashSet<usize>>),
}Expand description
Enum to control decoding of some Parquet statistics fields.
§Example
use parquet::file::metadata::ParquetStatisticsPolicy;
use parquet::file::serialized_reader::ReadOptionsBuilder;
use parquet::arrow::arrow_reader::ArrowReaderOptions;
// Set arrow options to skip encoding statistics for all columns.
let options =
ArrowReaderOptions::new().with_encoding_stats_policy(ParquetStatisticsPolicy::SkipAll);
// Set serialized reader options to decode encoding statistics for all columns.
let options =
ReadOptionsBuilder::new().with_encoding_stats_policy(ParquetStatisticsPolicy::KeepAll)
.build();
// Set arrow options to skip encoding statistics for all columns, but to decode statistics
// for columns 0 and 1.
let options = ArrowReaderOptions::new()
.with_encoding_stats_policy(ParquetStatisticsPolicy::skip_except(&[0, 1]));Variants§
KeepAll
Decode the relevant statistics for all columns.
SkipAll
Skip decoding the relevant statistics for all columns.
SkipExcept(Arc<HashSet<usize>>)
Skip decoding the relevant statistics for all columns not in the provided set of column indices.
Implementations§
Source§impl ParquetStatisticsPolicy
impl ParquetStatisticsPolicy
Sourcepub fn skip_except(keep: &[usize]) -> Self
pub fn skip_except(keep: &[usize]) -> Self
Create a ParquetStatisticsPolicy to skip all columns except those in keep.
If keep is empty, then this returns Self::SkipAll
Trait Implementations§
Source§impl Clone for ParquetStatisticsPolicy
impl Clone for ParquetStatisticsPolicy
Source§fn clone(&self) -> ParquetStatisticsPolicy
fn clone(&self) -> ParquetStatisticsPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParquetStatisticsPolicy
impl Debug for ParquetStatisticsPolicy
Source§impl Default for ParquetStatisticsPolicy
impl Default for ParquetStatisticsPolicy
Source§fn default() -> ParquetStatisticsPolicy
fn default() -> ParquetStatisticsPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParquetStatisticsPolicy
impl RefUnwindSafe for ParquetStatisticsPolicy
impl Send for ParquetStatisticsPolicy
impl Sync for ParquetStatisticsPolicy
impl Unpin for ParquetStatisticsPolicy
impl UnwindSafe for ParquetStatisticsPolicy
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
Mutably borrows from an owned value. Read more
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>
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 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>
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