Interface CatalogManager

All Known Implementing Classes:
EmptyCatalogManager, InMemoryCatalogManager

@Internal public interface CatalogManager
Top-level authority that manages Catalogs. Used inside the root BeamCalciteSchema.

Implementations should have a way of determining which catalog is currently active, and produce it when currentCatalog() is invoked.

When registerTableProvider(String, TableProvider) is called, the provider should become available for all catalogs.

  • Method Details

    • createCatalog

      void createCatalog(String name, String type, Map<String,String> properties)
      Creates and stores a catalog of a particular type.
    • useCatalog

      void useCatalog(String name)
      Switches the active catalog.
    • currentCatalog

      Catalog currentCatalog()
      Produces the currently active catalog.
    • getCatalog

      @Nullable Catalog getCatalog(String name)
      Attempts to fetch the catalog with this name. May produce null if it does not exist.
    • dropCatalog

      void dropCatalog(String name)
      Drops the catalog with this name. No-op if the catalog already does not exist.
    • registerTableProvider

      void registerTableProvider(String name, TableProvider tableProvider)
      Registers a TableProvider and propagates it to all the Catalog instances available to this manager.
    • registerTableProvider

      default void registerTableProvider(TableProvider tp)