@PublicEvolving public class ResolvedCatalogMaterializedTable extends Object implements ResolvedCatalogBaseTable<CatalogMaterializedTable>, CatalogMaterializedTable
CatalogMaterializedTable
that is backed by the original metadata coming from
the Catalog
but resolved by the framework.
Note: This will be converted to ResolvedCatalogTable
by framework during planner
optimize query phase.
CatalogMaterializedTable.Builder, CatalogMaterializedTable.LogicalRefreshMode, CatalogMaterializedTable.RefreshMode, CatalogMaterializedTable.RefreshStatus
CatalogBaseTable.TableKind
Constructor and Description |
---|
ResolvedCatalogMaterializedTable(CatalogMaterializedTable origin,
ResolvedSchema resolvedSchema) |
Modifier and Type | Method and Description |
---|---|
CatalogBaseTable |
copy()
Get a deep copy of the CatalogBaseTable instance.
|
ResolvedCatalogMaterializedTable |
copy(CatalogMaterializedTable.RefreshStatus refreshStatus,
String refreshHandlerDescription,
byte[] serializedRefreshHandler)
Returns a copy of this
CatalogDynamicTable with given refresh info. |
ResolvedCatalogMaterializedTable |
copy(Map<String,String> options)
Returns a copy of this
CatalogMaterializedTable with given table options options . |
boolean |
equals(Object o) |
String |
getComment()
Get comment of the table or view.
|
IntervalFreshness |
getDefinitionFreshness()
Get the definition freshness of materialized table which is used to determine the physical
refresh mode.
|
String |
getDefinitionQuery()
The definition query text of materialized table, text is expanded in contrast to the original
SQL.
|
Optional<String> |
getDescription()
Get a brief description of the table or view.
|
Optional<String> |
getDetailedDescription()
Get a detailed description of the table or view.
|
CatalogMaterializedTable.LogicalRefreshMode |
getLogicalRefreshMode()
Get the logical refresh mode of materialized table.
|
Map<String,String> |
getOptions()
Returns a map of string-based options.
|
CatalogMaterializedTable |
getOrigin()
Returns the original, unresolved metadata object from the
Catalog . |
List<String> |
getPartitionKeys()
Get the partition keys of the table.
|
Optional<String> |
getRefreshHandlerDescription()
Return summary description of refresh handler.
|
CatalogMaterializedTable.RefreshMode |
getRefreshMode()
Get the physical refresh mode of materialized table.
|
CatalogMaterializedTable.RefreshStatus |
getRefreshStatus()
Get the refresh status of materialized table.
|
ResolvedSchema |
getResolvedSchema()
Returns a fully resolved and validated
ResolvedSchema . |
byte[] |
getSerializedRefreshHandler()
Return the serialized refresh handler of materialized table.
|
Optional<Long> |
getSnapshot()
Return the snapshot specified for the table.
|
int |
hashCode() |
boolean |
isPartitioned()
Check if the table is partitioned or not.
|
ResolvedCatalogTable |
toResolvedCatalogTable()
Convert this object to a
ResolvedCatalogTable object for planner optimize query. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSchema
getFreshness, getTableKind, newBuilder
getUnresolvedSchema
public ResolvedCatalogMaterializedTable(CatalogMaterializedTable origin, ResolvedSchema resolvedSchema)
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 CatalogBaseTable copy()
CatalogBaseTable
copy
in interface CatalogBaseTable
public ResolvedCatalogMaterializedTable copy(Map<String,String> options)
CatalogMaterializedTable
CatalogMaterializedTable
with given table options options
.copy
in interface CatalogMaterializedTable
public ResolvedCatalogMaterializedTable copy(CatalogMaterializedTable.RefreshStatus refreshStatus, String refreshHandlerDescription, byte[] serializedRefreshHandler)
CatalogMaterializedTable
CatalogDynamicTable
with given refresh info.copy
in interface CatalogMaterializedTable
public Optional<String> getDescription()
CatalogBaseTable
getDescription
in interface CatalogBaseTable
public Optional<String> getDetailedDescription()
CatalogBaseTable
getDetailedDescription
in interface CatalogBaseTable
public boolean isPartitioned()
CatalogMaterializedTable
isPartitioned
in interface CatalogMaterializedTable
public List<String> getPartitionKeys()
CatalogMaterializedTable
getPartitionKeys
in interface CatalogMaterializedTable
public Optional<Long> getSnapshot()
CatalogMaterializedTable
getSnapshot
in interface CatalogMaterializedTable
public CatalogMaterializedTable getOrigin()
ResolvedCatalogBaseTable
Catalog
.
This method might be useful if catalog-specific object instances should be directly forwarded from the catalog to a factory.
getOrigin
in interface ResolvedCatalogBaseTable<CatalogMaterializedTable>
public ResolvedSchema getResolvedSchema()
ResolvedCatalogBaseTable
ResolvedSchema
.
Connectors can configure themselves by accessing ResolvedSchema.getPrimaryKey()
and ResolvedSchema.toPhysicalRowDataType()
.
getResolvedSchema
in interface ResolvedCatalogBaseTable<CatalogMaterializedTable>
public String getDefinitionQuery()
CatalogMaterializedTable
For example, for a materialized table 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").
getDefinitionQuery
in interface CatalogMaterializedTable
public IntervalFreshness getDefinitionFreshness()
CatalogMaterializedTable
getDefinitionFreshness
in interface CatalogMaterializedTable
public CatalogMaterializedTable.LogicalRefreshMode getLogicalRefreshMode()
CatalogMaterializedTable
getLogicalRefreshMode
in interface CatalogMaterializedTable
public CatalogMaterializedTable.RefreshMode getRefreshMode()
CatalogMaterializedTable
getRefreshMode
in interface CatalogMaterializedTable
public CatalogMaterializedTable.RefreshStatus getRefreshStatus()
CatalogMaterializedTable
getRefreshStatus
in interface CatalogMaterializedTable
public Optional<String> getRefreshHandlerDescription()
CatalogMaterializedTable
getRefreshHandlerDescription
in interface CatalogMaterializedTable
@Nullable public byte[] getSerializedRefreshHandler()
CatalogMaterializedTable
getSerializedRefreshHandler
in interface CatalogMaterializedTable
public ResolvedCatalogTable toResolvedCatalogTable()
ResolvedCatalogTable
object for planner optimize query.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.