Struct datafusion::datasource::file_format::options::ParquetReadOptions
source · pub struct ParquetReadOptions<'a> {
pub file_extension: &'a str,
pub table_partition_cols: Vec<(String, DataType)>,
pub parquet_pruning: Option<bool>,
pub skip_metadata: Option<bool>,
pub schema: Option<&'a Schema>,
pub file_sort_order: Vec<Vec<Expr>>,
}Expand description
Options that control the reading of Parquet files.
Note this structure is supplied when a datasource is created and
can not not vary from statement to statement. For settings that
can vary statement to statement see
ConfigOptions.
Fields§
§file_extension: &'a strFile extension; only files with this extension are selected for data input. Defaults to “.parquet”.
table_partition_cols: Vec<(String, DataType)>Partition Columns
parquet_pruning: Option<bool>Should the parquet reader use the predicate to prune row groups? If None, uses value in SessionConfig
skip_metadata: Option<bool>Should the parquet reader to skip any metadata that may be in the file Schema? This can help avoid schema conflicts due to metadata.
If None specified, uses value in SessionConfig
schema: Option<&'a Schema>An optional schema representing the parquet files. If None, parquet reader will try to infer it based on data in file.
file_sort_order: Vec<Vec<Expr>>Indicates how the file is sorted
Implementations§
source§impl<'a> ParquetReadOptions<'a>
impl<'a> ParquetReadOptions<'a>
sourcepub fn parquet_pruning(self, parquet_pruning: bool) -> Self
pub fn parquet_pruning(self, parquet_pruning: bool) -> Self
Specify parquet_pruning
sourcepub fn skip_metadata(self, skip_metadata: bool) -> Self
pub fn skip_metadata(self, skip_metadata: bool) -> Self
Tell the parquet reader to skip any metadata that may be in the file Schema. This can help avoid schema conflicts due to metadata. Defaults to true.
sourcepub fn table_partition_cols(
self,
table_partition_cols: Vec<(String, DataType)>
) -> Self
pub fn table_partition_cols( self, table_partition_cols: Vec<(String, DataType)> ) -> Self
Specify table_partition_cols for partition pruning
sourcepub fn file_sort_order(self, file_sort_order: Vec<Vec<Expr>>) -> Self
pub fn file_sort_order(self, file_sort_order: Vec<Vec<Expr>>) -> Self
Configure if file has known sort order
Trait Implementations§
source§impl<'a> Clone for ParquetReadOptions<'a>
impl<'a> Clone for ParquetReadOptions<'a>
source§fn clone(&self) -> ParquetReadOptions<'a>
fn clone(&self) -> ParquetReadOptions<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<'a> Default for ParquetReadOptions<'a>
impl<'a> Default for ParquetReadOptions<'a>
source§impl ReadOptions<'_> for ParquetReadOptions<'_>
impl ReadOptions<'_> for ParquetReadOptions<'_>
source§fn to_listing_options(&self, config: &SessionConfig) -> ListingOptions
fn to_listing_options(&self, config: &SessionConfig) -> ListingOptions
ListingTable options