pub struct DefaultTableSource {
pub table_provider: Arc<dyn TableProvider>,
}Expand description
Implements TableSource for a TableProvider
This structure adapts a TableProvider (a physical plan trait) to the
TableSource (logical plan trait).
It is used so logical plans in the datafusion_expr crate do not have a
direct dependency on physical plans, such as TableProviders.
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 table_type(&self) -> TableType
fn table_type(&self) -> TableType
Get the type of this table for metadata/catalog purposes.
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 optimize data retrieval.
Source§fn get_logical_plan(&self) -> Option<Cow<'_, LogicalPlan>>
fn get_logical_plan(&self) -> Option<Cow<'_, LogicalPlan>>
Get the Logical plan of this table provider, if available. Read more
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