Optimizer rules allow Calcite to rewrite queries using materializations, if they are valid (that is, contain the same result as executing their defining query) and lower cost.
In future, the actor may manage the process of updating materializations, instantiating materializations from the intermediate results of queries, and recognize what materializations would be useful based on actual query load.
Interface Summary Interface Description LatticeStatisticProviderEstimates row counts for a lattice and its attributes. LatticeStatisticProvider.Factory MaterializationService.TableFactoryCreates tables that represent a materialized view. SqlStatisticProviderEstimates row counts for tables and columns, and whether combinations of columns form primary/unique and foreign keys.
Class Summary Class Description CachingLatticeStatisticProviderImplementation of
LatticeStatisticProviderthat caches single-column statistics and computes multi-column statistics from these.
LatticeStatisticProviderthat delegates to an underlying provider.
LatticeStructure that allows materialized views based upon a star schema to be recognized and recommended. Lattice.BaseColumnColumn in a lattice. Lattice.BuilderLattice builder. Lattice.Builder.FixerWork space for fixing up a tree of mutable nodes. Lattice.ColumnColumn in a lattice. Lattice.DerivedColumnColumn in a lattice that is based upon a SQL expression. Lattice.EdgeEdge in the temporary graph. Lattice.MeasureA measure within a
Lattice.SqlWriterThe information necessary to convert a column to SQL. Lattice.TileMaterialized aggregate within a lattice. Lattice.TileBuilderTile builder. Lattice.VertexVertex in the temporary graph. LatticeChildNodeNon-root node in a
LatticeNodeSource relation of a lattice. LatticeRootNodeRoot node in a
Lattices LatticeSpaceSpace within which lattices exist. LatticeSuggesterAlgorithm that suggests a set of lattices. LatticeSuggester.BaseColRefReference to a base column. LatticeSuggester.ColRefColumn reference. LatticeSuggester.DerivedColRefReference to a derived column (that is, an expression). LatticeSuggester.FrameInformation about the parent of fields from a relational expression. LatticeSuggester.HopA hop is a join condition. LatticeSuggester.MutableMeasureAn aggregate call. LatticeSuggester.QueryHolds state for a particular query graph. LatticeSuggester.StepRefUse of a step within a query. LatticeSuggester.StepRef.FactoryCreates
LatticeSuggester.TableRefUse of a table within a query. LatticeTableTable registered in the graph. MaterializationActorActor that manages the state of materializations in the system. MaterializationActor.MaterializationA query materialized in a table, so that reading from the table gives the same results as executing the query. MaterializationActor.QueryKeyA materialization can be re-used if it is the same SQL, on the same schema, with the same path for resolving functions. MaterializationKeyUnique identifier for a materialization. MaterializationServiceManages the collection of materialized tables known to the system, and the process by which they become valid and invalid. MaterializationService.DefaultTableFactoryDefault implementation of
MutableNodeMutable version of
LatticeNode, used while a graph is being built.
PathA sequence of
Steps from a root node (fact table) to another node (dimension table), possibly via intermediate dimension tables.
ProfilerLatticeStatisticProvider SqlLatticeStatisticProviderImplementation of
LatticeStatisticProviderthat gets statistics by executing "SELECT COUNT(DISTINCT ...) ..." SQL queries.
StepEdge in the join graph. Step.FactoryCreates
TileKeyDefinition of a particular combination of dimensions and measures of a lattice that is the basis of a materialization. TileSuggesterAlgorithm that suggests a set of initial tiles (materialized aggregate views) for a given lattice. TileSuggester.AttributeImplImplementation of
Attributebased on a
Schemabased on a
StatisticsProviderthat asks the lattice.
Tablebased on a