Class ResolvedCatalogMaterializedTable
- java.lang.Object
-
- org.apache.flink.table.catalog.ResolvedCatalogMaterializedTable
-
- All Implemented Interfaces:
CatalogBaseTable,CatalogMaterializedTable,ResolvedCatalogBaseTable<CatalogMaterializedTable>
@PublicEvolving public class ResolvedCatalogMaterializedTable extends Object implements ResolvedCatalogBaseTable<CatalogMaterializedTable>, CatalogMaterializedTable
A validatedCatalogMaterializedTablethat is backed by the original metadata coming from theCatalogbut resolved by the framework.Note: This will be converted to
ResolvedCatalogTableby framework during planner optimize query phase.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
CatalogBaseTable.TableKind
-
Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogMaterializedTable
CatalogMaterializedTable.Builder, CatalogMaterializedTable.LogicalRefreshMode, CatalogMaterializedTable.RefreshMode, CatalogMaterializedTable.RefreshStatus
-
-
Constructor Summary
Constructors Constructor Description ResolvedCatalogMaterializedTable(CatalogMaterializedTable origin, ResolvedSchema resolvedSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CatalogBaseTablecopy()Get a deep copy of the CatalogBaseTable instance.ResolvedCatalogMaterializedTablecopy(Map<String,String> options)Returns a copy of thisCatalogMaterializedTablewith given table optionsoptions.ResolvedCatalogMaterializedTablecopy(CatalogMaterializedTable.RefreshStatus refreshStatus, String refreshHandlerDescription, byte[] serializedRefreshHandler)Returns a copy of thisCatalogDynamicTablewith given refresh info.booleanequals(Object o)StringgetComment()Get comment of the table or view.IntervalFreshnessgetDefinitionFreshness()Get the definition freshness of materialized table which is used to determine the physical refresh mode.StringgetDefinitionQuery()The definition query text of materialized table, text is expanded in contrast to the original SQL.Optional<String>getDescription()Get a brief description of the table or view.Optional<String>getDetailedDescription()Get a detailed description of the table or view.CatalogMaterializedTable.LogicalRefreshModegetLogicalRefreshMode()Get the logical refresh mode of materialized table.Map<String,String>getOptions()Returns a map of string-based options.CatalogMaterializedTablegetOrigin()Returns the original, unresolved metadata object from theCatalog.List<String>getPartitionKeys()Get the partition keys of the table.Optional<String>getRefreshHandlerDescription()Return summary description of refresh handler.CatalogMaterializedTable.RefreshModegetRefreshMode()Get the physical refresh mode of materialized table.CatalogMaterializedTable.RefreshStatusgetRefreshStatus()Get the refresh status of materialized table.ResolvedSchemagetResolvedSchema()Returns a fully resolved and validatedResolvedSchema.byte[]getSerializedRefreshHandler()Return the serialized refresh handler of materialized table.Optional<Long>getSnapshot()Return the snapshot specified for the table.inthashCode()booleanisPartitioned()Check if the table is partitioned or not.ResolvedCatalogTabletoResolvedCatalogTable()Convert this object to aResolvedCatalogTableobject for planner optimize query.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
getUnresolvedSchema
-
Methods inherited from interface org.apache.flink.table.catalog.CatalogMaterializedTable
getFreshness, getTableKind
-
Methods inherited from interface org.apache.flink.table.catalog.ResolvedCatalogBaseTable
getSchema
-
-
-
-
Constructor Detail
-
ResolvedCatalogMaterializedTable
public ResolvedCatalogMaterializedTable(CatalogMaterializedTable origin, ResolvedSchema resolvedSchema)
-
-
Method Detail
-
getOptions
public Map<String,String> getOptions()
Description copied from interface:CatalogBaseTableReturns a map of string-based options.In case of
CatalogTable, these options may determine the kind of connector and its configuration for accessing the data in the external system. SeeDynamicTableFactoryfor more information. If aCatalogTableshould not be serializable, an implementation can simply throw a runtime exception in this method.- Specified by:
getOptionsin interfaceCatalogBaseTable
-
getComment
public String getComment()
Description copied from interface:CatalogBaseTableGet comment of the table or view.- Specified by:
getCommentin interfaceCatalogBaseTable- Returns:
- comment of the table/view.
-
copy
public CatalogBaseTable copy()
Description copied from interface:CatalogBaseTableGet a deep copy of the CatalogBaseTable instance.- Specified by:
copyin interfaceCatalogBaseTable- Returns:
- a copy of the CatalogBaseTable instance
-
copy
public ResolvedCatalogMaterializedTable copy(Map<String,String> options)
Description copied from interface:CatalogMaterializedTableReturns a copy of thisCatalogMaterializedTablewith given table optionsoptions.- Specified by:
copyin interfaceCatalogMaterializedTable- Returns:
- a new copy of this table with replaced table options
-
copy
public ResolvedCatalogMaterializedTable copy(CatalogMaterializedTable.RefreshStatus refreshStatus, String refreshHandlerDescription, byte[] serializedRefreshHandler)
Description copied from interface:CatalogMaterializedTableReturns a copy of thisCatalogDynamicTablewith given refresh info.- Specified by:
copyin interfaceCatalogMaterializedTable- Returns:
- a new copy of this table with replaced refresh info
-
getDescription
public Optional<String> getDescription()
Description copied from interface:CatalogBaseTableGet a brief description of the table or view.- Specified by:
getDescriptionin interfaceCatalogBaseTable- Returns:
- an optional short description of the table/view
-
getDetailedDescription
public Optional<String> getDetailedDescription()
Description copied from interface:CatalogBaseTableGet a detailed description of the table or view.- Specified by:
getDetailedDescriptionin interfaceCatalogBaseTable- Returns:
- an optional long description of the table/view
-
isPartitioned
public boolean isPartitioned()
Description copied from interface:CatalogMaterializedTableCheck if the table is partitioned or not.- Specified by:
isPartitionedin interfaceCatalogMaterializedTable- Returns:
- true if the table is partitioned; otherwise, false
-
getPartitionKeys
public List<String> getPartitionKeys()
Description copied from interface:CatalogMaterializedTableGet the partition keys of the table. This will be an empty set if the table is not partitioned.- Specified by:
getPartitionKeysin interfaceCatalogMaterializedTable- Returns:
- partition keys of the table
-
getSnapshot
public Optional<Long> getSnapshot()
Description copied from interface:CatalogMaterializedTableReturn the snapshot specified for the table. Return Optional.empty() if not specified.- Specified by:
getSnapshotin interfaceCatalogMaterializedTable
-
getOrigin
public CatalogMaterializedTable getOrigin()
Description copied from interface:ResolvedCatalogBaseTableReturns the original, unresolved metadata object from theCatalog.This method might be useful if catalog-specific object instances should be directly forwarded from the catalog to a factory.
- Specified by:
getOriginin interfaceResolvedCatalogBaseTable<CatalogMaterializedTable>
-
getResolvedSchema
public ResolvedSchema getResolvedSchema()
Description copied from interface:ResolvedCatalogBaseTableReturns a fully resolved and validatedResolvedSchema.Connectors can configure themselves by accessing
ResolvedSchema.getPrimaryKey()andResolvedSchema.toPhysicalRowDataType().- Specified by:
getResolvedSchemain interfaceResolvedCatalogBaseTable<CatalogMaterializedTable>
-
getDefinitionQuery
public String getDefinitionQuery()
Description copied from interface:CatalogMaterializedTableThe definition query text of materialized table, text is expanded in contrast to the original SQL. This is needed because the context such as current DB is lost after the session, in which view is defined, is gone. Expanded query text takes care of this, as an example.For example, for a materialized table that is defined in the context of "default" database with a query
select * from test1, the expanded query text might becomeselect `test1`.`name`, `test1`.`value` from `default`.`test1`, where table test1 resides in database "default" and has two columns ("name" and "value").- Specified by:
getDefinitionQueryin interfaceCatalogMaterializedTable- Returns:
- the materialized table definition in expanded text.
-
getDefinitionFreshness
public IntervalFreshness getDefinitionFreshness()
Description copied from interface:CatalogMaterializedTableGet the definition freshness of materialized table which is used to determine the physical refresh mode.- Specified by:
getDefinitionFreshnessin interfaceCatalogMaterializedTable
-
getLogicalRefreshMode
public CatalogMaterializedTable.LogicalRefreshMode getLogicalRefreshMode()
Description copied from interface:CatalogMaterializedTableGet the logical refresh mode of materialized table.- Specified by:
getLogicalRefreshModein interfaceCatalogMaterializedTable
-
getRefreshMode
public CatalogMaterializedTable.RefreshMode getRefreshMode()
Description copied from interface:CatalogMaterializedTableGet the physical refresh mode of materialized table.- Specified by:
getRefreshModein interfaceCatalogMaterializedTable
-
getRefreshStatus
public CatalogMaterializedTable.RefreshStatus getRefreshStatus()
Description copied from interface:CatalogMaterializedTableGet the refresh status of materialized table.- Specified by:
getRefreshStatusin interfaceCatalogMaterializedTable
-
getRefreshHandlerDescription
public Optional<String> getRefreshHandlerDescription()
Description copied from interface:CatalogMaterializedTableReturn summary description of refresh handler.- Specified by:
getRefreshHandlerDescriptionin interfaceCatalogMaterializedTable
-
getSerializedRefreshHandler
@Nullable public byte[] getSerializedRefreshHandler()
Description copied from interface:CatalogMaterializedTableReturn the serialized refresh handler of materialized table. This will not be used for describe table.- Specified by:
getSerializedRefreshHandlerin interfaceCatalogMaterializedTable
-
toResolvedCatalogTable
public ResolvedCatalogTable toResolvedCatalogTable()
Convert this object to aResolvedCatalogTableobject for planner optimize query.
-
-