Class RelOptMaterialization

java.lang.Object
org.apache.calcite.plan.RelOptMaterialization

public class RelOptMaterialization extends Object
Records that a particular query is materialized by a particular table.
  • Field Details

    • tableRel

      public final RelNode tableRel
    • starRelOptTable

      public final @Nullable RelOptTable starRelOptTable
    • starTable

      public final @Nullable StarTable starTable
    • qualifiedTableName

      public final List<String> qualifiedTableName
    • queryRel

      public final RelNode queryRel
  • Constructor Details

    • RelOptMaterialization

      public RelOptMaterialization(RelNode tableRel, RelNode queryRel, @Nullable RelOptTable starRelOptTable, List<String> qualifiedTableName)
      Creates a RelOptMaterialization.
  • Method Details

    • tryUseStar

      public static @Nullable RelNode tryUseStar(RelNode rel, RelOptTable starRelOptTable)
      Converts a relational expression to one that uses a StarTable.

      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 where LogicalJoins are as close to leaves as possible.