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
FieldsModifier and TypeFieldDescriptionfinal RelNodefinal @Nullable RelOptTablefinal @Nullable StarTablefinal RelNode -
Constructor Summary
ConstructorsConstructorDescriptionRelOptMaterialization(RelNode tableRel, RelNode queryRel, @Nullable RelOptTable starRelOptTable, List<String> qualifiedTableName) Creates a RelOptMaterialization. -
Method Summary
Modifier and TypeMethodDescriptionstatic RelNodetoLeafJoinForm(RelNode rel) Converts a relational expression to a form whereLogicalJoins are as close to leaves as possible.static @Nullable RelNodetryUseStar(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 whereLogicalJoins are as close to leaves as possible.
-