Package org.apache.calcite.schema.impl
Class MaterializedViewTable
java.lang.Object
org.apache.calcite.schema.impl.AbstractTable
org.apache.calcite.adapter.java.AbstractQueryableTable
org.apache.calcite.schema.impl.ViewTable
org.apache.calcite.schema.impl.MaterializedViewTable
- All Implemented Interfaces:
QueryableTable,Table,TranslatableTable,Wrapper
Table that is a materialized view.
It can exist in two states: materialized and not materialized. Over time,
a given materialized view may switch states. How it is expanded depends upon
its current state. State is managed by
MaterializationService.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTable function that returns the table that materializes a view. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CalciteConnectionInternal connection, used to execute queries to materialize views.Fields inherited from class org.apache.calcite.adapter.java.AbstractQueryableTable
elementType -
Constructor Summary
ConstructorsConstructorDescriptionMaterializedViewTable(Type elementType, RelProtoDataType relDataType, String viewSql, List<String> viewSchemaPath, @Nullable List<String> viewPath, MaterializationKey key) -
Method Summary
Modifier and TypeMethodDescriptioncreate(CalciteSchema schema, String viewSql, @Nullable List<String> viewSchemaPath, List<String> viewPath, @Nullable String suggestedTableName, boolean existing) Table macro that returns a materialized view.toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable) Converts this table into arelational expression.Methods inherited from class org.apache.calcite.schema.impl.ViewTable
asQueryable, getJdbcTableType, getRowType, getSchemaPath, getViewPath, getViewSql, viewMacro, viewMacro, viewMacroMethods inherited from class org.apache.calcite.adapter.java.AbstractQueryableTable
getElementType, getExpressionMethods inherited from class org.apache.calcite.schema.impl.AbstractTable
getStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.Table
getStatistic, isRolledUp, rolledUpColumnValidInsideAggMethods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Field Details
-
MATERIALIZATION_CONNECTION
Internal connection, used to execute queries to materialize views. To be used only by Calcite internals. And sparingly.
-
-
Constructor Details
-
MaterializedViewTable
public MaterializedViewTable(Type elementType, RelProtoDataType relDataType, String viewSql, List<String> viewSchemaPath, @Nullable List<String> viewPath, MaterializationKey key)
-
-
Method Details
-
create
public static MaterializedViewTable.MaterializedViewTableMacro create(CalciteSchema schema, String viewSql, @Nullable List<String> viewSchemaPath, List<String> viewPath, @Nullable String suggestedTableName, boolean existing) Table macro that returns a materialized view. -
toRel
Description copied from interface:TranslatableTableConverts this table into arelational expression.- Specified by:
toRelin interfaceTranslatableTable- Overrides:
toRelin classViewTable
-