Package org.apache.flink.table.catalog
Class AbstractCatalogView
- java.lang.Object
-
- org.apache.flink.table.catalog.AbstractCatalogView
-
- All Implemented Interfaces:
CatalogBaseTable
,CatalogView
- Direct Known Subclasses:
CatalogViewImpl
@Internal public abstract class AbstractCatalogView extends Object implements CatalogView
An abstract catalog view.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
CatalogBaseTable.TableKind
-
-
Constructor Summary
Constructors Constructor Description AbstractCatalogView(String originalQuery, String expandedQuery, TableSchema schema, Map<String,String> options, String comment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComment()
Get comment of the table or view.String
getExpandedQuery()
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.String
getOriginalQuery()
Original text of the view definition that also preserves the original formatting.TableSchema
getSchema()
-
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.CatalogBaseTable
copy, getDescription, getDetailedDescription, getUnresolvedSchema
-
Methods inherited from interface org.apache.flink.table.catalog.CatalogView
getTableKind
-
-
-
-
Method Detail
-
getOriginalQuery
public String getOriginalQuery()
Description copied from interface:CatalogView
Original text of the view definition that also preserves the original formatting.- Specified by:
getOriginalQuery
in interfaceCatalogView
- Returns:
- the original string literal provided by the user.
-
getExpandedQuery
public String getExpandedQuery()
Description copied from interface:CatalogView
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. 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:
getExpandedQuery
in interfaceCatalogView
- Returns:
- the view definition in expanded text.
-
getOptions
public Map<String,String> getOptions()
Description copied from interface:CatalogBaseTable
Returns 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. SeeDynamicTableFactory
for more information. If aCatalogTable
should not be serializable, an implementation can simply throw a runtime exception in this method.- Specified by:
getOptions
in interfaceCatalogBaseTable
-
getSchema
public TableSchema getSchema()
- Specified by:
getSchema
in interfaceCatalogBaseTable
-
getComment
public String getComment()
Description copied from interface:CatalogBaseTable
Get comment of the table or view.- Specified by:
getComment
in interfaceCatalogBaseTable
- Returns:
- comment of the table/view.
-
-