Trait datafusion::execution::options::ReadOptions
source · pub trait ReadOptions<'a> {
fn to_listing_options(&self, config: &SessionConfig) -> ListingOptions;
fn get_resolved_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 SessionConfig,
state: SessionState,
table_path: ListingTableUrl
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn _get_resolved_schema<'life0, 'async_trait>(
&'a self,
config: &'life0 SessionConfig,
state: SessionState,
table_path: ListingTableUrl,
schema: Option<&'a Schema>,
infinite: bool
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>
where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
{ ... }
}
Expand description
[‘ReadOptions’] is implemented by Options like [‘CsvReadOptions’] that control the reading of respective files/sources.
Required Methods§
sourcefn to_listing_options(&self, config: &SessionConfig) -> ListingOptions
fn to_listing_options(&self, config: &SessionConfig) -> ListingOptions
Helper to convert these user facing options to ListingTable
options
sourcefn get_resolved_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 SessionConfig,
state: SessionState,
table_path: ListingTableUrl
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_resolved_schema<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 SessionConfig,
state: SessionState,
table_path: ListingTableUrl
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Infer and resolve the schema from the files/sources provided.
Provided Methods§
sourcefn _get_resolved_schema<'life0, 'async_trait>(
&'a self,
config: &'life0 SessionConfig,
state: SessionState,
table_path: ListingTableUrl,
schema: Option<&'a Schema>,
infinite: bool
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn _get_resolved_schema<'life0, 'async_trait>(
&'a self,
config: &'life0 SessionConfig,
state: SessionState,
table_path: ListingTableUrl,
schema: Option<&'a Schema>,
infinite: bool
) -> Pin<Box<dyn Future<Output = Result<SchemaRef>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
helper function to reduce repetitive code. Infers the schema from sources if not provided. Infinite data sources not supported through this function.