Struct datafusion::datasource::view::ViewTable
source · pub struct ViewTable { /* private fields */ }
Expand description
An implementation of TableProvider
that uses another logical plan.
Implementations§
source§impl ViewTable
impl ViewTable
sourcepub fn try_new(
logical_plan: LogicalPlan,
definition: Option<String>
) -> Result<Self>
pub fn try_new( logical_plan: LogicalPlan, definition: Option<String> ) -> Result<Self>
Create new view that is executed at query runtime.
Takes a LogicalPlan
and an optional create statement as input.
sourcepub fn definition(&self) -> Option<&String>
pub fn definition(&self) -> Option<&String>
Get definition ref
sourcepub fn logical_plan(&self) -> &LogicalPlan
pub fn logical_plan(&self) -> &LogicalPlan
Get logical_plan ref
Trait Implementations§
source§impl TableProvider for ViewTable
impl TableProvider for ViewTable
source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns the table provider as
Any
so that it can be
downcast to a specific implementation.source§fn get_logical_plan(&self) -> Option<&LogicalPlan>
fn get_logical_plan(&self) -> Option<&LogicalPlan>
Get the Logical Plan of this table, if available.
source§fn table_type(&self) -> TableType
fn table_type(&self) -> TableType
Get the type of this table for metadata/catalog purposes.
source§fn get_table_definition(&self) -> Option<&str>
fn get_table_definition(&self) -> Option<&str>
Get the create statement used to create this table, if available.
source§fn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
fn supports_filter_pushdown( &self, _filter: &Expr ) -> Result<TableProviderFilterPushDown>
👎Deprecated since 20.0.0: use supports_filters_pushdown instead
Tests whether the table provider can make use of a filter expression
to optimise data retrieval.
source§fn scan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 SessionState,
projection: Option<&'life2 Vec<usize>>,
filters: &'life3 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn scan<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, state: &'life1 SessionState, projection: Option<&'life2 Vec<usize>>, filters: &'life3 [Expr], limit: Option<usize> ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,
Create an ExecutionPlan that will scan the table.
The table provider will be usually responsible of grouping
the source data into partitions that can be efficiently
parallelized or distributed.
source§fn supports_filters_pushdown(
&self,
filters: &[&Expr]
) -> Result<Vec<TableProviderFilterPushDown>>
fn supports_filters_pushdown( &self, filters: &[&Expr] ) -> Result<Vec<TableProviderFilterPushDown>>
Tests whether the table provider can make use of any or all filter expressions
to optimise data retrieval.
source§fn statistics(&self) -> Option<Statistics>
fn statistics(&self) -> Option<Statistics>
Get statistics for this table, if available
source§fn insert_into<'life0, 'life1, 'async_trait>(
&'life0 self,
_state: &'life1 SessionState,
_input: Arc<dyn ExecutionPlan>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_into<'life0, 'life1, 'async_trait>( &'life0 self, _state: &'life1 SessionState, _input: Arc<dyn ExecutionPlan> ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Return an
ExecutionPlan
to insert data into this table, if
supported. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ViewTable
impl Send for ViewTable
impl Sync for ViewTable
impl Unpin for ViewTable
impl !UnwindSafe for ViewTable
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