pub struct RemoteTable { /* private fields */ }
Expand description
Represents a remote table with a reference and schema.
Implementations§
Source§impl RemoteTable
impl RemoteTable
Sourcepub fn new(table_ref: RemoteTableRef, schema: SchemaRef) -> Self
pub fn new(table_ref: RemoteTableRef, schema: SchemaRef) -> Self
Creates a new RemoteTable
instance.
Examples:
ⓘ
use datafusion::sql::TableReference;
RemoteTable::new("myschema.table".try_into()?, schema);
RemoteTable::new(r#"myschema."Table""#.try_into()?, schema);
RemoteTable::new(TableReference::partial("myschema", "table").into(), schema);
RemoteTable::new("myschema.view('obj')".try_into()?, schema);
RemoteTable::new("myschema.view(name => 'obj')".try_into()?, schema);
RemoteTable::new("myschema.view(name = 'obj')".try_into()?, schema);
Sourcepub fn table_reference(&self) -> &TableReference
pub fn table_reference(&self) -> &TableReference
Return table reference of this remote table. Only returns the object name, ignoring functional params if any
pub fn schema(&self) -> &SchemaRef
Trait Implementations§
Source§impl Clone for RemoteTable
impl Clone for RemoteTable
Source§fn clone(&self) -> RemoteTable
fn clone(&self) -> RemoteTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RemoteTable
impl Debug for RemoteTable
Source§impl Hash for RemoteTable
impl Hash for RemoteTable
Source§impl PartialEq for RemoteTable
impl PartialEq for RemoteTable
Source§impl SQLTable for RemoteTable
impl SQLTable for RemoteTable
Source§fn ast_analyzer(&self) -> Option<AstAnalyzer>
fn ast_analyzer(&self) -> Option<AstAnalyzer>
Returns ast analyzer that modifies table that contains functional args after table ident
Source§fn table_reference(&self) -> TableReference
fn table_reference(&self) -> TableReference
Provides the
TableReference
used to identify the table in SQL queries.
This TableReference is used for registering the table with the SQLSchemaProvider
.
If the table provider is registered in the Datafusion context under a different name,
the logical plan will be rewritten to use this table reference during execution.
Therefore, any AST analyzer should match against this table reference.Source§fn logical_optimizer(&self) -> Option<LogicalOptimizer>
fn logical_optimizer(&self) -> Option<LogicalOptimizer>
Returns a logical optimizer specific to this table, will be used to modify the logical plan before execution
impl Eq for RemoteTable
impl StructuralPartialEq for RemoteTable
Auto Trait Implementations§
impl Freeze for RemoteTable
impl RefUnwindSafe for RemoteTable
impl Send for RemoteTable
impl Sync for RemoteTable
impl Unpin for RemoteTable
impl UnwindSafe for RemoteTable
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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