pub struct DataBackendSession {
pub chunk_size: usize,
pub runtime: Handle,
/* private fields */
}Expand description
Provides a DataFusion session for registering and querying catalog table sources.
Fields§
§chunk_size: usize§runtime: HandleImplementations§
Source§impl DataBackendSession
impl DataBackendSession
Sourcepub fn new(chunk_size: usize) -> Self
pub fn new(chunk_size: usize) -> Self
Creates a new DataBackendSession instance.
Sourcepub fn register_object_store(
&mut self,
url: &Url,
object_store: Arc<dyn ObjectStore>,
)
pub fn register_object_store( &mut self, url: &Url, object_store: Arc<dyn ObjectStore>, )
Register an object store with the session context
Sourcepub fn register_storage_backend(
&mut self,
storage: &StorageBackend,
) -> Result<()>
pub fn register_storage_backend( &mut self, storage: &StorageBackend, ) -> Result<()>
Registers an OpenDAL-backed storage backend with the session context.
External catalog implementations can call this before adding native table providers or object-store-relative file paths to the session.
§Errors
Returns an error if the storage URI cannot be converted into a DataFusion root URL.
Sourcepub fn register_table_provider(
&mut self,
table_name: &str,
provider: Arc<dyn TableProvider>,
) -> Result<()>
pub fn register_table_provider( &mut self, table_name: &str, provider: Arc<dyn TableProvider>, ) -> Result<()>
Registers a table provider with the session context.
This supports non-Parquet table formats such as Delta Lake while keeping the Parquet registration path unchanged.
Sourcepub fn clear_registered_tables(&mut self)
pub fn clear_registered_tables(&mut self)
Clears all registered tables.
This is useful when the underlying files have changed and we need to re-register tables with updated data.
Auto Trait Implementations§
impl !RefUnwindSafe for DataBackendSession
impl !UnwindSafe for DataBackendSession
impl Freeze for DataBackendSession
impl Send for DataBackendSession
impl Sync for DataBackendSession
impl Unpin for DataBackendSession
impl UnsafeUnpin for DataBackendSession
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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