Struct datafusion::datasource::view::ViewTable
source · pub struct ViewTable { /* private fields */ }Expand description
An implementation of TableProvider that uses another logical plan.
Implementations
sourceimpl 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
sourceimpl TableProvider for ViewTable
impl TableProvider for ViewTable
sourcefn get_logical_plan(&self) -> Option<&LogicalPlan>
fn get_logical_plan(&self) -> Option<&LogicalPlan>
Get the Logical Plan of this table, if available.
sourcefn table_type(&self) -> TableType
fn table_type(&self) -> TableType
Get the type of this table for metadata/catalog purposes.
sourcefn get_table_definition(&self) -> Option<&str>
fn get_table_definition(&self) -> Option<&str>
Get the create statement used to create this table, if available.
sourcefn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
fn supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown>
Tests whether the table provider can make use of a filter expression
to optimise data retrieval. Read more
sourcefn scan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 SessionState,
projection: &'life2 Option<Vec<usize>>,
filters: &'life3 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn scan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 SessionState,
projection: &'life2 Option<Vec<usize>>,
filters: &'life3 [Expr],
limit: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ExecutionPlan>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: '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. Read more
sourcefn statistics(&self) -> Option<Statistics>
fn statistics(&self) -> Option<Statistics>
Get statistics for this table, if available
Auto Trait Implementations
impl !RefUnwindSafe for ViewTable
impl Send for ViewTable
impl Sync for ViewTable
impl Unpin for ViewTable
impl !UnwindSafe for ViewTable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more