Package org.apache.flink.table.catalog
Interface CatalogRegistry
-
- All Known Implementing Classes:
CatalogManager
@PublicEvolving public interface CatalogRegistryA catalog registry for dealing with catalogs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>>getCatalogBaseTable(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier)Retrieves a fully qualified table.org.apache.flink.table.catalog.CataloggetCatalogOrError(String catalogName)Gets a catalog by name.StringgetCurrentCatalog()Gets the name of the current catalog.StringgetCurrentDatabase()Get the name of the current database.Optional<org.apache.flink.table.catalog.CatalogPartition>getPartition(org.apache.flink.table.catalog.ObjectIdentifier tableIdentifier, org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)Retrieves a partition with a fully qualified table path and partition spec.booleanisTemporaryTable(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier)Return whether the table with a fully qualified table path is temporary or not.org.apache.flink.table.catalog.ObjectIdentifierqualifyIdentifier(org.apache.flink.table.catalog.UnresolvedIdentifier identifier)Returns the full name of the given table path, this name may be padded with current catalog/database name based on theidentifier'slength.
-
-
-
Method Detail
-
getCurrentDatabase
String getCurrentDatabase()
Get the name of the current database.
-
getCurrentCatalog
String getCurrentCatalog()
Gets the name of the current catalog.
-
qualifyIdentifier
org.apache.flink.table.catalog.ObjectIdentifier qualifyIdentifier(org.apache.flink.table.catalog.UnresolvedIdentifier identifier)
Returns the full name of the given table path, this name may be padded with current catalog/database name based on theidentifier'slength.- Parameters:
identifier- an unresolved identifier- Returns:
- a fully qualified object identifier
-
getCatalogOrError
org.apache.flink.table.catalog.Catalog getCatalogOrError(String catalogName) throws org.apache.flink.table.api.CatalogNotExistException
Gets a catalog by name.- Parameters:
catalogName- name of the catalog to retrieve- Returns:
- the requested catalog
- Throws:
org.apache.flink.table.api.CatalogNotExistException- if the catalog does not exist
-
getCatalogBaseTable
Optional<org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>> getCatalogBaseTable(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier)
Retrieves a fully qualified table. If the path is not yet fully qualified usequalifyIdentifier(UnresolvedIdentifier)first.- Parameters:
objectIdentifier- full path of the table to retrieve- Returns:
- resolved table that the path points to or empty if it does not exist.
-
isTemporaryTable
boolean isTemporaryTable(org.apache.flink.table.catalog.ObjectIdentifier objectIdentifier)
Return whether the table with a fully qualified table path is temporary or not.- Parameters:
objectIdentifier- full path of the table- Returns:
- the table is temporary or not.
-
getPartition
Optional<org.apache.flink.table.catalog.CatalogPartition> getPartition(org.apache.flink.table.catalog.ObjectIdentifier tableIdentifier, org.apache.flink.table.catalog.CatalogPartitionSpec partitionSpec)
Retrieves a partition with a fully qualified table path and partition spec.- Parameters:
tableIdentifier- full path of the table to retrievepartitionSpec- full partition spec- Returns:
- partition in the table.
-
-