pub struct DefaultTableSource {
pub table_provider: Arc<dyn TableProvider>,
}
Expand description
DataFusion default table source, wrapping TableProvider.
This structure adapts a TableProvider
(physical plan trait) to the TableSource
(logical plan trait) and is necessary because the logical plan is contained in
the datafusion_expr
crate, and is not aware of table providers, which exist in
the core datafusion
crate.
Fields§
§table_provider: Arc<dyn TableProvider>
table provider
Implementations§
source§impl DefaultTableSource
impl DefaultTableSource
sourcepub fn new(table_provider: Arc<dyn TableProvider>) -> Self
pub fn new(table_provider: Arc<dyn TableProvider>) -> Self
Create a new DefaultTableSource to wrap a TableProvider
Trait Implementations§
source§impl TableSource for DefaultTableSource
impl TableSource for DefaultTableSource
source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns the table source as Any
so that it can be
downcast to a specific implementation.
source§fn constraints(&self) -> Option<&Constraints>
fn constraints(&self) -> Option<&Constraints>
Get a reference to applicable constraints, if any exists.
source§fn supports_filters_pushdown(
&self,
filter: &[&Expr]
) -> Result<Vec<TableProviderFilterPushDown>>
fn supports_filters_pushdown( &self, filter: &[&Expr] ) -> Result<Vec<TableProviderFilterPushDown>>
Tests whether the table provider can make use of any or all filter expressions to optimise data retrieval.
source§fn get_logical_plan(&self) -> Option<&LogicalPlan>
fn get_logical_plan(&self) -> Option<&LogicalPlan>
Get the Logical plan of this table provider, if available.
source§fn get_column_default(&self, column: &str) -> Option<&Expr>
fn get_column_default(&self, column: &str) -> Option<&Expr>
Get the default value for a column, 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 supports_filter_pushdown(
&self,
_filter: &Expr
) -> Result<TableProviderFilterPushDown, DataFusionError>
fn supports_filter_pushdown( &self, _filter: &Expr ) -> Result<TableProviderFilterPushDown, DataFusionError>
👎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.
Auto Trait Implementations§
impl Freeze for DefaultTableSource
impl !RefUnwindSafe for DefaultTableSource
impl Send for DefaultTableSource
impl Sync for DefaultTableSource
impl Unpin for DefaultTableSource
impl !UnwindSafe for DefaultTableSource
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more