Class ResolvedCatalogView
- java.lang.Object
-
- org.apache.flink.table.catalog.ResolvedCatalogView
-
- All Implemented Interfaces:
CatalogBaseTable,CatalogView,ResolvedCatalogBaseTable<CatalogView>
@PublicEvolving public final class ResolvedCatalogView extends Object implements ResolvedCatalogBaseTable<CatalogView>, CatalogView
A validatedCatalogViewthat is backed by the original metadata coming from theCatalogbut resolved by the framework.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
CatalogBaseTable.TableKind
-
-
Constructor Summary
Constructors Constructor Description ResolvedCatalogView(CatalogView 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.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.StringgetExpandedQuery()Expanded text of the original view definition This is needed because the context such as current DB is lost after the session, in which view is defined, is gone.Map<String,String>getOptions()Returns a map of string-based options.CatalogViewgetOrigin()Returns the original, unresolved metadata object from theCatalog.StringgetOriginalQuery()Original text of the view definition that also preserves the original formatting.ResolvedSchemagetResolvedSchema()Returns a fully resolved and validatedResolvedSchema.SchemagetUnresolvedSchema()Returns the schema of the table or view.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.catalog.CatalogView
getTableKind
-
Methods inherited from interface org.apache.flink.table.catalog.ResolvedCatalogBaseTable
getSchema
-
-
-
-
Constructor Detail
-
ResolvedCatalogView
public ResolvedCatalogView(CatalogView origin, ResolvedSchema resolvedSchema)
-
-
Method Detail
-
getOrigin
public CatalogView 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<CatalogView>
-
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<CatalogView>
-
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
-
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.
-
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
-
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
-
getOriginalQuery
public String getOriginalQuery()
Description copied from interface:CatalogViewOriginal text of the view definition that also preserves the original formatting.- Specified by:
getOriginalQueryin interfaceCatalogView- Returns:
- the original string literal provided by the user.
-
getExpandedQuery
public String getExpandedQuery()
Description copied from interface:CatalogViewExpanded text of the original view definition 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 view 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:
getExpandedQueryin interfaceCatalogView- Returns:
- the view definition in expanded text.
-
-