Interface CatalogTable
- All Superinterfaces:
CatalogBaseTable
- All Known Implementing Classes:
DefaultCatalogTable,ResolvedCatalogTable
Catalog.
It contains all characteristics that can be expressed in a SQL CREATE TABLE statement.
The framework will resolve instances of this interface to a ResolvedCatalogTable before
passing it to a DynamicTableFactory for creating a connector to an external system.
A catalog implementer can either use newBuilder() for a basic implementation of this
interface or create a custom class that allows passing catalog-specific objects all the way down
to the connector creation (if necessary).
Note: The default implementation that is available via newBuilder() is always
serializable. For example, it can be used for implementing a catalog that uses ResolvedCatalogTable.toProperties() or for persisting compiled plans. An implementation of this
interface determines whether a catalog table can be serialized by providing a proper CatalogBaseTable.getOptions() method.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilder for configuring and creating instances ofCatalogTable.Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
CatalogBaseTable.TableKind -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of thisCatalogTablewith given table optionsoptions.static CatalogTablefromProperties(Map<String, String> properties) Creates an instance ofCatalogTablefrom a map of string properties that were previously created withResolvedCatalogTable.toProperties().default Optional<TableDistribution>Returns the distribution of the table if theDISTRIBUTEDclause is defined.Get the partition keys of the table.Return the snapshot specified for the table.default CatalogBaseTable.TableKindThe kind of table thisCatalogBaseTabledescribes.booleanCheck if the table is partitioned or not.static CatalogTable.BuilderBuilder for configuring and creating instances ofCatalogTable.Methods inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
copy, getComment, getDescription, getDetailedDescription, getOptions, getSchema, getUnresolvedSchema
-
Method Details
-
newBuilder
Builder for configuring and creating instances ofCatalogTable. -
fromProperties
Creates an instance ofCatalogTablefrom a map of string properties that were previously created withResolvedCatalogTable.toProperties().Note that the serialization and deserialization of catalog tables are not symmetric. The framework will resolve functions and perform other validation tasks. A catalog implementation must not deal with this during a read operation.
- Parameters:
properties- serialized version of aCatalogTablethat includes schema, partition keys, and connector options
-
getTableKind
Description copied from interface:CatalogBaseTableThe kind of table thisCatalogBaseTabledescribes.- Specified by:
getTableKindin interfaceCatalogBaseTable
-
isPartitioned
boolean isPartitioned()Check if the table is partitioned or not.- Returns:
- true if the table is partitioned; otherwise, false
-
getPartitionKeys
Get the partition keys of the table. This will be an empty set if the table is not partitioned.- Returns:
- partition keys of the table
-
copy
Returns a copy of thisCatalogTablewith given table optionsoptions.- Returns:
- a new copy of this table with replaced table options
-
getSnapshot
Return the snapshot specified for the table. Return Optional.empty() if not specified. -
getDistribution
Returns the distribution of the table if theDISTRIBUTEDclause is defined.
-