@Internal public final class QueryOperationCatalogView extends Object implements CatalogView
QueryOperation
via operations on Table
.CatalogBaseTable.TableKind
Constructor and Description |
---|
QueryOperationCatalogView(QueryOperation queryOperation) |
Modifier and Type | Method and Description |
---|---|
QueryOperationCatalogView |
copy()
Get a deep copy of the CatalogBaseTable instance.
|
String |
getComment()
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.
|
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.
|
QueryOperation |
getQueryOperation() |
Schema |
getUnresolvedSchema()
Returns the schema of the table or view.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTableKind, of
getSchema
public QueryOperationCatalogView(QueryOperation queryOperation)
public QueryOperation getQueryOperation()
public Schema getUnresolvedSchema()
CatalogBaseTable
The schema can reference objects from other catalogs and will be resolved and validated by the framework when accessing the table or view.
getUnresolvedSchema
in interface CatalogBaseTable
ResolvedCatalogTable
,
ResolvedCatalogView
public Map<String,String> getOptions()
CatalogBaseTable
In case of CatalogTable
, these options may determine the kind of connector and its
configuration for accessing the data in the external system. See DynamicTableFactory
for more information. If a CatalogTable
should not be serializable, an implementation
can simply throw a runtime exception in this method.
getOptions
in interface CatalogBaseTable
public String getComment()
CatalogBaseTable
getComment
in interface CatalogBaseTable
public QueryOperationCatalogView copy()
CatalogBaseTable
copy
in interface CatalogBaseTable
public Optional<String> getDescription()
CatalogBaseTable
getDescription
in interface CatalogBaseTable
public Optional<String> getDetailedDescription()
CatalogBaseTable
getDetailedDescription
in interface CatalogBaseTable
public String getOriginalQuery()
CatalogView
getOriginalQuery
in interface CatalogView
public String getExpandedQuery()
CatalogView
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 become select
`test1`.`name`, `test1`.`value` from `default`.`test1`
, where table test1 resides in
database "default" and has two columns ("name" and "value").
getExpandedQuery
in interface CatalogView
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.