Interface CatalogRegistry

All Known Implementing Classes:
CatalogManager

@PublicEvolving public interface CatalogRegistry
A catalog registry for dealing with catalogs.
  • Method Summary

    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.Catalog
    Gets a catalog by name.
    Gets the name of the current catalog.
    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.
    boolean
    isTemporaryTable(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.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 the identifier's length.
  • Method Details

    • 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 the identifier's length.
      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 use qualifyIdentifier(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 retrieve
      partitionSpec - full partition spec
      Returns:
      partition in the table.