Package org.apache.flink.table.catalog
Class DefaultCatalogTable
- java.lang.Object
-
- org.apache.flink.table.catalog.DefaultCatalogTable
-
- All Implemented Interfaces:
CatalogBaseTable,CatalogTable
@Internal public class DefaultCatalogTable extends Object implements CatalogTable
Default implementation of aCatalogTable.
-
-
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.CatalogTable
CatalogTable.Builder
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultCatalogTable(Schema schema, String comment, List<String> partitionKeys, Map<String,String> options)protectedDefaultCatalogTable(Schema schema, String comment, List<String> partitionKeys, Map<String,String> options, Long snapshot, TableDistribution distribution)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CatalogBaseTablecopy()Get a deep copy of the CatalogBaseTable instance.CatalogTablecopy(Map<String,String> options)Returns a copy of thisCatalogTablewith given table optionsoptions.booleanequals(Object o)StringgetComment()Get comment of the table or view.Optional<String>getDescription()Get a brief description of the table or view.Optional<String>getDetailedDescription()Get a detailed description of the table or view.Optional<TableDistribution>getDistribution()Returns the distribution of the table if theDISTRIBUTEDclause is defined.Map<String,String>getOptions()Returns a map of string-based options.List<String>getPartitionKeys()Get the partition keys of the table.Optional<Long>getSnapshot()Return the snapshot specified for the table.SchemagetUnresolvedSchema()Returns the schema of the table or view.inthashCode()booleanisPartitioned()Check if the table is partitioned or not.Map<String,String>toProperties()Serializes this instance into a map of string-based properties.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
getSchema
-
Methods inherited from interface org.apache.flink.table.catalog.CatalogTable
getTableKind
-
-
-
-
Method Detail
-
getUnresolvedSchema
public Schema getUnresolvedSchema()
Description copied from interface:CatalogBaseTableReturns the schema of the table or view.The schema can reference objects from other catalogs and will be resolved and validated by the framework when accessing the table or view.
- Specified by:
getUnresolvedSchemain interfaceCatalogBaseTable- See Also:
ResolvedCatalogTable,ResolvedCatalogView
-
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.
-
isPartitioned
public boolean isPartitioned()
Description copied from interface:CatalogTableCheck if the table is partitioned or not.- Specified by:
isPartitionedin interfaceCatalogTable- Returns:
- true if the table is partitioned; otherwise, false
-
getPartitionKeys
public List<String> getPartitionKeys()
Description copied from interface:CatalogTableGet the partition keys of the table. This will be an empty set if the table is not partitioned.- Specified by:
getPartitionKeysin interfaceCatalogTable- Returns:
- partition keys of the table
-
getDistribution
public Optional<TableDistribution> getDistribution()
Description copied from interface:CatalogTableReturns the distribution of the table if theDISTRIBUTEDclause is defined.- Specified by:
getDistributionin interfaceCatalogTable
-
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
-
getSnapshot
public Optional<Long> getSnapshot()
Description copied from interface:CatalogTableReturn the snapshot specified for the table. Return Optional.empty() if not specified.- Specified by:
getSnapshotin interfaceCatalogTable
-
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 CatalogTable copy(Map<String,String> options)
Description copied from interface:CatalogTableReturns a copy of thisCatalogTablewith given table optionsoptions.- Specified by:
copyin interfaceCatalogTable- Returns:
- a new copy of this table with replaced table options
-
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
-
toProperties
public Map<String,String> toProperties()
Description copied from interface:CatalogTableSerializes this instance into a map of string-based properties.Compared to the pure table options in
CatalogBaseTable.getOptions(), the map includes schema, partitioning, and other characteristics in a serialized form.- Specified by:
toPropertiesin interfaceCatalogTable
-
-