Package org.apache.calcite.materialize
Class LatticeSuggester
java.lang.Object
org.apache.calcite.materialize.LatticeSuggester
Algorithm that suggests a set of lattices.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a query.Returns the minimal set of lattices necessary to cover all of the queries seen.toRex
(LatticeTable table, int column) Converts a column reference to an expression.
-
Constructor Details
-
LatticeSuggester
Creates a LatticeSuggester.
-
-
Method Details
-
getLatticeSet
Returns the minimal set of lattices necessary to cover all of the queries seen. Any lattices that are subsumed by other lattices are not included. -
toRex
Converts a column reference to an expression. -
addQuery
Adds a query.It may fit within an existing lattice (or lattices). Or it may need a new lattice, or an extension to an existing lattice.
- Parameters:
r
- Relational expression for a query- Returns:
- A list of join graphs: usually 1; more if the query contains a cartesian product; zero if the query graph is cyclic
-