Package org.apache.calcite.plan
Class RelOptLattice
- java.lang.Object
-
- org.apache.calcite.plan.RelOptLattice
-
public class RelOptLattice extends java.lang.Object
Use of a lattice by the query optimizer.
-
-
Field Summary
Fields Modifier and Type Field Description Lattice
lattice
RelOptTable
starRelOptTable
-
Constructor Summary
Constructors Constructor Description RelOptLattice(Lattice lattice, RelOptTable starRelOptTable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<CalciteSchema.TableEntry,TileKey>
getAggregate(RelOptPlanner planner, ImmutableBitSet groupSet, java.util.List<Lattice.Measure> measureList)
Retrieves a materialized table that will satisfy an aggregate query on the star table.RelNode
rewrite(RelNode node)
Rewrites a relational expression to use a lattice.RelOptTable
rootTable()
-
-
-
Field Detail
-
lattice
public final Lattice lattice
-
starRelOptTable
public final RelOptTable starRelOptTable
-
-
Constructor Detail
-
RelOptLattice
public RelOptLattice(Lattice lattice, RelOptTable starRelOptTable)
-
-
Method Detail
-
rootTable
public RelOptTable rootTable()
-
rewrite
public RelNode rewrite(RelNode node)
Rewrites a relational expression to use a lattice.Returns null if a rewrite is not possible.
- Parameters:
node
- Relational expression- Returns:
- Rewritten query
-
getAggregate
public Pair<CalciteSchema.TableEntry,TileKey> getAggregate(RelOptPlanner planner, ImmutableBitSet groupSet, java.util.List<Lattice.Measure> measureList)
Retrieves a materialized table that will satisfy an aggregate query on the star table.The current implementation creates a materialization and populates it, provided that
Lattice.auto
is true.Future implementations might return materializations at a different level of aggregation, from which the desired result can be obtained by rolling up.
- Parameters:
planner
- Current plannergroupSet
- Grouping keymeasureList
- Calls to aggregate functions- Returns:
- Materialized table
-
-