Package org.apache.calcite.plan
Class RelOptMaterialization
java.lang.Object
org.apache.calcite.plan.RelOptMaterialization
Records that a particular query is materialized by a particular table.
-
Field Summary
Modifier and TypeFieldDescriptionfinal RelNode
final @Nullable RelOptTable
final @Nullable StarTable
final RelNode
-
Constructor Summary
ConstructorDescriptionRelOptMaterialization
(RelNode tableRel, RelNode queryRel, @Nullable RelOptTable starRelOptTable, List<String> qualifiedTableName) Creates a RelOptMaterialization. -
Method Summary
Modifier and TypeMethodDescriptionstatic RelNode
toLeafJoinForm
(RelNode rel) Converts a relational expression to a form whereLogicalJoin
s are as close to leaves as possible.static @Nullable RelNode
tryUseStar
(RelNode rel, RelOptTable starRelOptTable) Converts a relational expression to one that uses aStarTable
.
-
Field Details
-
tableRel
-
starRelOptTable
-
starTable
-
qualifiedTableName
-
queryRel
-
-
Constructor Details
-
RelOptMaterialization
public RelOptMaterialization(RelNode tableRel, RelNode queryRel, @Nullable RelOptTable starRelOptTable, List<String> qualifiedTableName) Creates a RelOptMaterialization.
-
-
Method Details
-
tryUseStar
Converts a relational expression to one that uses aStarTable
.The relational expression is already in leaf-join-form, per
toLeafJoinForm(org.apache.calcite.rel.RelNode)
.- Returns:
- Rewritten expression, or null if expression cannot be rewritten to use the star
-
toLeafJoinForm
Converts a relational expression to a form whereLogicalJoin
s are as close to leaves as possible.
-