Package org.apache.flink.table.catalog
Class ContextResolvedTable
- java.lang.Object
-
- org.apache.flink.table.catalog.ContextResolvedTable
-
@Internal public final class ContextResolvedTable extends Object
This class contains information about a table, itsResolvedSchema
, its options and its relationship with aCatalog
, if any.There can be 3 kinds of
ContextResolvedTable
:- A permanent table: a table which is stored in a
Catalog
and has an associated uniqueObjectIdentifier
. - A temporary table: a table which is stored in the
CatalogManager
, has an associated uniqueObjectIdentifier
and 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
andCatalogManager
instance specific, hence for these two kind of tables, an instance of this object represents the relationship between the specificResolvedCatalogBaseTable
instance and the specificCatalog
/CatalogManager
instances. For example, the sameResolvedCatalogBaseTable
can be temporary for one catalog, but permanent for another one. - A permanent table: a table which is stored in a
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContextResolvedTable
anonymous(String hint, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
static ContextResolvedTable
anonymous(org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
ContextResolvedTable
copy(Map<String,String> newOptions)
Copy theContextResolvedTable
, replacing the underlyingCatalogTable
options.ContextResolvedTable
copy(org.apache.flink.table.catalog.ResolvedSchema newSchema)
Copy theContextResolvedTable
, replacing the underlyingResolvedSchema
.boolean
equals(Object o)
Optional<org.apache.flink.table.catalog.Catalog>
getCatalog()
Returns empty ifisPermanent()
is false.org.apache.flink.table.catalog.ObjectIdentifier
getIdentifier()
org.apache.flink.table.catalog.ResolvedSchema
getResolvedSchema()
<T extends org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?>>
TgetResolvedTable()
Returns a fully resolved catalog object.<T extends org.apache.flink.table.catalog.CatalogBaseTable>
TgetTable()
Returns the original metadata object returned by the catalog.int
hashCode()
boolean
isAnonymous()
boolean
isPermanent()
boolean
isTemporary()
static ContextResolvedTable
permanent(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.Catalog catalog, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
static ContextResolvedTable
temporary(org.apache.flink.table.catalog.ObjectIdentifier identifier, org.apache.flink.table.catalog.ResolvedCatalogBaseTable<?> resolvedTable)
ContextResolvedTable
toCatalogTable()
String
toString()
-
-
-
Method Detail
-
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
public Optional<org.apache.flink.table.catalog.Catalog> 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
public ContextResolvedTable toCatalogTable()
-
copy
public ContextResolvedTable copy(Map<String,String> newOptions)
Copy theContextResolvedTable
, replacing the underlyingCatalogTable
options.
-
copy
public ContextResolvedTable copy(org.apache.flink.table.catalog.ResolvedSchema newSchema)
Copy theContextResolvedTable
, replacing the underlyingResolvedSchema
.
-
-