Class EnvironmentReusableInMemoryCatalog

java.lang.Object
org.apache.flink.table.catalog.AbstractCatalog
org.apache.flink.table.catalog.GenericInMemoryCatalog
org.apache.flink.table.gateway.service.context.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.flink.table.catalog.Catalog

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

    • EnvironmentReusableInMemoryCatalog

      public EnvironmentReusableInMemoryCatalog(String name, String defaultDatabase)
  • Method Details

    • 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