Struct datafusion::execution::options::AvroReadOptions
source · pub struct AvroReadOptions<'a> {
pub schema: Option<&'a Schema>,
pub file_extension: &'a str,
pub table_partition_cols: Vec<(String, DataType)>,
pub infinite: bool,
}
Expand description
Options that control the reading of AVRO 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§
§schema: Option<&'a Schema>
The data source schema.
file_extension: &'a str
File extension; only files with this extension are selected for data input.
Defaults to FileType::AVRO.get_ext().as_str()
.
table_partition_cols: Vec<(String, DataType)>
Partition Columns
infinite: bool
Flag indicating whether this file may be unbounded (as in a FIFO file).
Implementations§
source§impl<'a> AvroReadOptions<'a>
impl<'a> AvroReadOptions<'a>
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 to_listing_options(&self, target_partitions: usize) -> ListingOptions
pub fn to_listing_options(&self, target_partitions: usize) -> ListingOptions
Helper to convert these user facing options to ListingTable
options
sourcepub fn mark_infinite(self, infinite: bool) -> Self
pub fn mark_infinite(self, infinite: bool) -> Self
Configure mark_infinite setting
Trait Implementations§
source§impl<'a> Clone for AvroReadOptions<'a>
impl<'a> Clone for AvroReadOptions<'a>
source§fn clone(&self) -> AvroReadOptions<'a>
fn clone(&self) -> AvroReadOptions<'a>
Returns a copy 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 more