Class EnvironmentReusableInMemoryCatalog

  • All Implemented Interfaces:
    org.apache.flink.table.catalog.Catalog

    public class EnvironmentReusableInMemoryCatalog
    extends org.apache.flink.table.catalog.GenericInMemoryCatalog
    An in-memory catalog that can be reused across different TableEnvironment. The SQL client works against TableEnvironment design and reuses some of the components (e.g. CatalogManager), but not all (e.g. Planner) which causes e.g. views registered in an in-memory catalog to fail. This class is a workaround not to keep Planner bound parts of a view reused across different TableEnvironment.
    • Field Summary

      • Fields inherited from class org.apache.flink.table.catalog.GenericInMemoryCatalog

        DEFAULT_DB
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createTable​(org.apache.flink.table.catalog.ObjectPath tablePath, org.apache.flink.table.catalog.CatalogBaseTable table, boolean ignoreIfExists)  
      • Methods inherited from class org.apache.flink.table.catalog.GenericInMemoryCatalog

        alterDatabase, alterFunction, alterModel, alterPartition, alterPartitionColumnStatistics, alterPartitionStatistics, alterTable, alterTableColumnStatistics, alterTableStatistics, close, createDatabase, createFunction, createModel, createPartition, databaseExists, dropDatabase, dropFunction, dropModel, dropPartition, dropTable, functionExists, getDatabase, getFunction, getModel, getPartition, getPartitionColumnStatistics, getPartitionStatistics, getTable, getTableColumnStatistics, getTableStatistics, listDatabases, listFunctions, listModels, listPartitions, listPartitions, listPartitionsByFilter, listTables, listViews, modelExists, open, partitionExists, renameModel, renameTable, tableExists
      • Methods inherited from class org.apache.flink.table.catalog.AbstractCatalog

        getDefaultDatabase, getName
      • Methods inherited from interface org.apache.flink.table.catalog.Catalog

        alterTable, bulkGetPartitionColumnStatistics, bulkGetPartitionStatistics, dropDatabase, getFactory, getFunctionDefinitionFactory, getProcedure, getTable, listProcedures
    • Constructor Detail

      • EnvironmentReusableInMemoryCatalog

        public EnvironmentReusableInMemoryCatalog​(String name,
                                                  String defaultDatabase)
    • Method Detail

      • createTable

        public void createTable​(org.apache.flink.table.catalog.ObjectPath tablePath,
                                org.apache.flink.table.catalog.CatalogBaseTable table,
                                boolean ignoreIfExists)
                         throws org.apache.flink.table.catalog.exceptions.TableAlreadyExistException,
                                org.apache.flink.table.catalog.exceptions.DatabaseNotExistException
        Specified by:
        createTable in interface org.apache.flink.table.catalog.Catalog
        Overrides:
        createTable in class org.apache.flink.table.catalog.GenericInMemoryCatalog
        Throws:
        org.apache.flink.table.catalog.exceptions.TableAlreadyExistException
        org.apache.flink.table.catalog.exceptions.DatabaseNotExistException