Package org.apache.calcite.plan
Class RelOptMaterialization
- java.lang.Object
-
- org.apache.calcite.plan.RelOptMaterialization
-
public class RelOptMaterialization extends java.lang.Object
Records that a particular query is materialized by a particular table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RelOptMaterialization.ProjectFilterTable
A table scan and optional project mapping and filter condition.
-
Field Summary
Fields Modifier and Type Field Description java.util.List<java.lang.String>
qualifiedTableName
RelNode
queryRel
RelOptTable
starRelOptTable
StarTable
starTable
RelNode
tableRel
-
Constructor Summary
Constructors Constructor Description RelOptMaterialization(RelNode tableRel, RelNode queryRel, RelOptTable starRelOptTable, java.util.List<java.lang.String> qualifiedTableName)
Creates a RelOptMaterialization.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RelNode
toLeafJoinForm(RelNode rel)
Converts a relational expression to a form whereLogicalJoin
s are as close to leaves as possible.static RelNode
tryUseStar(RelNode rel, RelOptTable starRelOptTable)
Converts a relational expression to one that uses aStarTable
.
-
-
-
Field Detail
-
tableRel
public final RelNode tableRel
-
starRelOptTable
public final RelOptTable starRelOptTable
-
starTable
public final StarTable starTable
-
qualifiedTableName
public final java.util.List<java.lang.String> qualifiedTableName
-
queryRel
public final RelNode queryRel
-
-
Constructor Detail
-
RelOptMaterialization
public RelOptMaterialization(RelNode tableRel, RelNode queryRel, RelOptTable starRelOptTable, java.util.List<java.lang.String> qualifiedTableName)
Creates a RelOptMaterialization.
-
-
Method Detail
-
tryUseStar
public static RelNode tryUseStar(RelNode rel, RelOptTable starRelOptTable)
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
public static RelNode toLeafJoinForm(RelNode rel)
Converts a relational expression to a form whereLogicalJoin
s are as close to leaves as possible.
-
-