Package org.apache.flink.table.catalog
Class ContextResolvedTable
java.lang.Object
org.apache.flink.table.catalog.ContextResolvedTable
This class contains information about a table, its
ResolvedSchema, its options and its
relationship with a Catalog, if any.
There can be 3 kinds of ContextResolvedTable:
- A permanent table: a table which is stored in a
Catalogand has an associated uniqueObjectIdentifier. - A temporary table: a table which is stored in the
CatalogManager, has an associated uniqueObjectIdentifierand is flagged as temporary. - An anonymous/inline table: a table which is not stored in a catalog and doesn't have an
associated unique
ObjectIdentifier.
The different handling of temporary and permanent tables is Catalog and CatalogManager instance specific, hence for these two kind of tables, an instance of this object
represents the relationship between the specific ResolvedCatalogBaseTable instance and
the specific Catalog/CatalogManager instances. For example, the same ResolvedCatalogBaseTable can be temporary for one catalog, but permanent for another one.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContextResolvedTablestatic ContextResolvedTableanonymous(org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) Copy theContextResolvedTable, replacing the underlyingCatalogTableoptions.copy(org.apache.flink.table.catalog.ResolvedSchema newSchema) Copy theContextResolvedTable, replacing the underlyingResolvedSchema.booleanOptional<org.apache.flink.table.catalog.Catalog>Returns empty ifisPermanent()is false.org.apache.flink.table.catalog.ObjectIdentifierorg.apache.flink.table.catalog.ResolvedSchema<T extends org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>>
TReturns a fully resolved catalog object.<T extends org.apache.flink.table.catalog.CatalogBaseTable>
TgetTable()Returns the original metadata object returned by the catalog.inthashCode()booleanbooleanbooleanstatic ContextResolvedTablepermanent(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.Catalog catalog, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) static ContextResolvedTabletemporary(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) toString()
-
Method Details
-
permanent
public static ContextResolvedTable permanent(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.Catalog catalog, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) -
temporary
public static ContextResolvedTable temporary(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) -
anonymous
public static ContextResolvedTable anonymous(org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) -
anonymous
public static ContextResolvedTable anonymous(String hint, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable) -
isAnonymous
public boolean isAnonymous() -
isTemporary
public boolean isTemporary()- Returns:
- true if the table is temporary. An anonymous table is always temporary.
-
isPermanent
public boolean isPermanent() -
getIdentifier
public org.apache.flink.table.catalog.ObjectIdentifier getIdentifier() -
getCatalog
Returns empty ifisPermanent()is false. -
getResolvedTable
public <T extends org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>> T getResolvedTable()Returns a fully resolved catalog object. -
getResolvedSchema
public org.apache.flink.table.catalog.ResolvedSchema getResolvedSchema() -
getTable
public <T extends org.apache.flink.table.catalog.CatalogBaseTable> T getTable()Returns the original metadata object returned by the catalog. -
toCatalogTable
-
copy
Copy theContextResolvedTable, replacing the underlyingCatalogTableoptions. -
copy
Copy theContextResolvedTable, replacing the underlyingResolvedSchema. -
toString
-
equals
-
hashCode
public int hashCode()
-