pub struct IcebergCatalogProvider { /* private fields */ }
Expand description
Provides an interface to manage and access multiple schemas
within an Iceberg Catalog
.
Acts as a centralized catalog provider that aggregates
multiple SchemaProvider
, each associated with distinct namespaces.
Implementations§
Source§impl IcebergCatalogProvider
impl IcebergCatalogProvider
Sourcepub async fn try_new(client: Arc<dyn Catalog>) -> Result<Self>
pub async fn try_new(client: Arc<dyn Catalog>) -> Result<Self>
Asynchronously tries to construct a new IcebergCatalogProvider
using the given client to fetch and initialize schema providers for
each namespace in the Iceberg Catalog
.
This method retrieves the list of namespace names
attempts to create a schema provider for each namespace, and
collects these providers into a HashMap
.
Trait Implementations§
Source§impl CatalogProvider for IcebergCatalogProvider
impl CatalogProvider for IcebergCatalogProvider
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Returns the catalog provider as
Any
so that it can be downcast to a specific implementation.Source§fn schema_names(&self) -> Vec<String>
fn schema_names(&self) -> Vec<String>
Retrieves the list of available schema names in this catalog.
Source§fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
Retrieves a specific schema from the catalog by name, provided it exists.
Source§fn register_schema(
&self,
name: &str,
schema: Arc<dyn SchemaProvider>,
) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
fn register_schema( &self, name: &str, schema: Arc<dyn SchemaProvider>, ) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
Adds a new schema to this catalog. Read more
Source§fn deregister_schema(
&self,
_name: &str,
_cascade: bool,
) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
fn deregister_schema( &self, _name: &str, _cascade: bool, ) -> Result<Option<Arc<dyn SchemaProvider>>, DataFusionError>
Removes a schema from this catalog. Implementations of this method should return
errors if the schema exists but cannot be dropped. For example, in DataFusion’s
default in-memory catalog,
MemoryCatalogProvider
, a non-empty schema
will only be successfully dropped when cascade
is true.
This is equivalent to how DROP SCHEMA works in PostgreSQL. Read moreAuto Trait Implementations§
impl Freeze for IcebergCatalogProvider
impl !RefUnwindSafe for IcebergCatalogProvider
impl Send for IcebergCatalogProvider
impl Sync for IcebergCatalogProvider
impl Unpin for IcebergCatalogProvider
impl !UnwindSafe for IcebergCatalogProvider
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> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
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