Class RelOptRule

java.lang.Object
org.apache.calcite.plan.RelOptRule
Direct Known Subclasses:
RelRule

public abstract class RelOptRule
extends Object
A RelOptRule transforms an expression into another. It has a list of RelOptRuleOperands, which determine whether the rule can be applied to a particular section of the tree.

The optimizer figures out which rules are applicable, then calls onMatch(org.apache.calcite.plan.RelOptRuleCall) on each of them.

  • Field Details

  • Constructor Details

    • RelOptRule

      public RelOptRule​(RelOptRuleOperand operand)
      Creates a rule.
      Parameters:
      operand - root operand, must not be null
    • RelOptRule

      public RelOptRule​(RelOptRuleOperand operand, String description)
      Creates a rule with an explicit description.
      Parameters:
      operand - root operand, must not be null
      description - Description, or null to guess description
    • RelOptRule

      public RelOptRule​(RelOptRuleOperand operand, RelBuilderFactory relBuilderFactory, String description)
      Creates a rule with an explicit description.
      Parameters:
      operand - root operand, must not be null
      description - Description, or null to guess description
      relBuilderFactory - Builder for relational expressions
  • Method Details