Package org.apache.calcite.materialize
Management of materialized query results.
An actor (MaterializationActor
)
maintains the state of all
materializations in the system and is wrapped in a service
(MaterializationService
)
for access from other parts of the system.
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 LatticeStatisticProvider Estimates row counts for a lattice and its attributes.LatticeStatisticProvider.Factory Creates aLatticeStatisticProvider
for a givenLattice
.MaterializationService.TableFactory Creates tables that represent a materialized view.SqlStatisticProvider Estimates row counts for tables and columns. -
Class Summary Class Description CachingLatticeStatisticProvider Implementation ofLatticeStatisticProvider
that caches single-column statistics and computes multi-column statistics from these.DelegatingLatticeStatisticProvider Implementation ofLatticeStatisticProvider
that delegates to an underlying provider.Lattice Structure that allows materialized views based upon a star schema to be recognized and recommended.Lattice.BaseColumn Column in a lattice.Lattice.Builder Lattice builder.Lattice.Builder.Fixer Work space for fixing up a tree of mutable nodes.Lattice.Column Column in a lattice.Lattice.DerivedColumn Column in a lattice that is based upon a SQL expression.Lattice.Edge Edge in the temporary graph.Lattice.Measure A measure within aLattice
.Lattice.SqlWriter The information necessary to convert a column to SQL.Lattice.Tile Materialized aggregate within a lattice.Lattice.TileBuilder Tile builder.Lattice.Vertex Vertex in the temporary graph.LatticeChildNode Non-root node in aLattice
.LatticeNode Source relation of a lattice.LatticeRootNode Root node in aLattice
.Lattices Utilities forLattice
,LatticeStatisticProvider
.LatticeSpace Space within which lattices exist.LatticeSuggester Algorithm that suggests a set of lattices.LatticeSuggester.BaseColRef Reference to a base column.LatticeSuggester.ColRef Column reference.LatticeSuggester.DerivedColRef Reference to a derived column (that is, an expression).LatticeSuggester.Frame Information about the parent of fields from a relational expression.LatticeSuggester.Hop A hop is a join condition.LatticeSuggester.MutableMeasure An aggregate call.LatticeSuggester.Query Holds state for a particular query graph.LatticeSuggester.StepRef Use of a step within a query.LatticeSuggester.StepRef.Factory CreatesLatticeSuggester.StepRef
instances.LatticeSuggester.TableRef Use of a table within a query.LatticeTable Table registered in the graph.MaterializationActor Actor that manages the state of materializations in the system.MaterializationActor.Materialization A query materialized in a table, so that reading from the table gives the same results as executing the query.MaterializationActor.QueryKey A materialization can be re-used if it is the same SQL, on the same schema, with the same path for resolving functions.MaterializationKey Unique identifier for a materialization.MaterializationService Manages the collection of materialized tables known to the system, and the process by which they become valid and invalid.MaterializationService.DefaultTableFactory Default implementation ofMaterializationService.TableFactory
.MutableNode Mutable version ofLatticeNode
, used while a graph is being built.Path A sequence ofStep
s from a root node (fact table) to another node (dimension table), possibly via intermediate dimension tables.ProfilerLatticeStatisticProvider Implementation ofLatticeStatisticProvider
that uses aProfiler
.SqlLatticeStatisticProvider Implementation ofLatticeStatisticProvider
that gets statistics by executing "SELECT COUNT(DISTINCT ...) ..." SQL queries.Step Edge in the join graph.Step.Factory CreatesStep
instances.TileKey Definition of a particular combination of dimensions and measures of a lattice that is the basis of a materialization.TileSuggester Algorithm that suggests a set of initial tiles (materialized aggregate views) for a given lattice.TileSuggester.AttributeImpl Implementation ofAttribute
based on aLattice.Column
.TileSuggester.SchemaImpl Implementation ofSchema
based on aLattice
.TileSuggester.StatisticsProviderImpl Implementation ofStatisticsProvider
that asks the lattice.TileSuggester.TableImpl Implementation ofTable
based on aLattice
. -
Enum Summary Enum Description MapSqlStatisticProvider Implementation ofSqlStatisticProvider
that looks up values in a table.