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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classTable function that returns the table that materializes a view.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final CalciteConnectionInternal connection, used to execute queries to materialize views.Fields inherited from class org.apache.calcite.adapter.java.AbstractQueryableTableelementType
- 
Constructor SummaryConstructorsConstructorDescriptionMaterializedViewTable(Type elementType, RelProtoDataType relDataType, String viewSql, List<String> viewSchemaPath, @Nullable List<String> viewPath, MaterializationKey key) 
- 
Method SummaryModifier 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.ViewTableasQueryable, getJdbcTableType, getRowType, getSchemaPath, getViewPath, getViewSql, viewMacro, viewMacro, viewMacroMethods inherited from class org.apache.calcite.adapter.java.AbstractQueryableTablegetElementType, getExpressionMethods inherited from class org.apache.calcite.schema.impl.AbstractTablegetStatistic, isRolledUp, rolledUpColumnValidInsideAgg, unwrapMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.schema.TablegetStatistic, isRolledUp, rolledUpColumnValidInsideAggMethods inherited from interface org.apache.calcite.schema.WrappermaybeUnwrap, unwrapOrThrow
- 
Field Details- 
MATERIALIZATION_CONNECTIONInternal connection, used to execute queries to materialize views. To be used only by Calcite internals. And sparingly.
 
- 
- 
Constructor Details- 
MaterializedViewTablepublic MaterializedViewTable(Type elementType, RelProtoDataType relDataType, String viewSql, List<String> viewSchemaPath, @Nullable List<String> viewPath, MaterializationKey key) 
 
- 
- 
Method Details- 
createpublic 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.
- 
toRelDescription copied from interface:TranslatableTableConverts this table into arelational expression.- Specified by:
- toRelin interface- TranslatableTable
- Overrides:
- toRelin class- ViewTable
 
 
-