pub struct PaimonCatalogProvider { /* private fields */ }Expand description
Provides an interface to manage and access multiple schemas (databases)
within a Paimon Catalog.
This provider uses lazy loading - databases and tables are fetched on-demand from the catalog, ensuring data is always fresh.
Implementations§
Source§impl PaimonCatalogProvider
impl PaimonCatalogProvider
Sourcepub fn new(
catalog_name: Option<String>,
catalog: Arc<dyn Catalog>,
dynamic_options: Arc<RwLock<HashMap<String, String>>>,
blob_reader_registry: BlobReaderRegistry,
session_state: Option<Arc<dyn Fn() -> Option<SessionState> + Send + Sync>>,
) -> Self
pub fn new( catalog_name: Option<String>, catalog: Arc<dyn Catalog>, dynamic_options: Arc<RwLock<HashMap<String, String>>>, blob_reader_registry: BlobReaderRegistry, session_state: Option<Arc<dyn Fn() -> Option<SessionState> + Send + Sync>>, ) -> Self
Creates a new PaimonCatalogProvider.
Sourcepub fn with_schema_force_view_types(self, schema_force_view_types: bool) -> Self
pub fn with_schema_force_view_types(self, schema_force_view_types: bool) -> Self
Configure whether table schemas use Arrow view types when available.
Disable this for consumers that cannot operate on Arrow view arrays. This changes the schema exposed to DataFusion, so query operators above the table scan will use the classic Arrow types as well.
Source§impl PaimonCatalogProvider
impl PaimonCatalogProvider
Sourcepub fn register_temp_table(
&self,
database: &str,
table_name: &str,
table: Arc<dyn TableProvider>,
) -> DFResult<()>
pub fn register_temp_table( &self, database: &str, table_name: &str, table: Arc<dyn TableProvider>, ) -> DFResult<()>
Registers a temporary table or view in the specified database. Creates the database if it does not exist.
Returns an error if a temp table with the same name already exists in the same database. Logs a warning if the name shadows a real Paimon table.
Sourcepub fn deregister_temp_table(
&self,
database: &str,
table_name: &str,
) -> DFResult<Option<Arc<dyn TableProvider>>>
pub fn deregister_temp_table( &self, database: &str, table_name: &str, ) -> DFResult<Option<Arc<dyn TableProvider>>>
Deregisters a temporary table or view from the specified database.
Sourcepub fn has_temp_table_database(&self, name: &str) -> bool
pub fn has_temp_table_database(&self, name: &str) -> bool
Returns whether a temp table database exists with the given name.
Sourcepub fn temp_table_exist(&self, database: &str, table_name: &str) -> bool
pub fn temp_table_exist(&self, database: &str, table_name: &str) -> bool
Returns whether a temp table with the given name exists in the specified database.
Trait Implementations§
Source§impl CatalogProvider for PaimonCatalogProvider
impl CatalogProvider for PaimonCatalogProvider
Source§fn schema_names(&self) -> Vec<String>
fn schema_names(&self) -> Vec<String>
Source§fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
fn schema(&self, name: &str) -> Option<Arc<dyn SchemaProvider>>
Source§fn register_schema(
&self,
name: &str,
_schema: Arc<dyn SchemaProvider>,
) -> DFResult<Option<Arc<dyn SchemaProvider>>>
fn register_schema( &self, name: &str, _schema: Arc<dyn SchemaProvider>, ) -> DFResult<Option<Arc<dyn SchemaProvider>>>
Source§fn deregister_schema(
&self,
name: &str,
cascade: bool,
) -> DFResult<Option<Arc<dyn SchemaProvider>>>
fn deregister_schema( &self, name: &str, cascade: bool, ) -> DFResult<Option<Arc<dyn SchemaProvider>>>
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 !RefUnwindSafe for PaimonCatalogProvider
impl !UnwindSafe for PaimonCatalogProvider
impl Freeze for PaimonCatalogProvider
impl Send for PaimonCatalogProvider
impl Sync for PaimonCatalogProvider
impl Unpin for PaimonCatalogProvider
impl UnsafeUnpin for PaimonCatalogProvider
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
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>
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 moreimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.