Calcite - (Planner) Rule (RelOptRule)

1 - About

A rule is used to modified a relational expression (ie query plan)

They are used by the planner to:

relational algebra expressions (ie query plan).

Every rule extends RelOptRule (and are used by the planner (RelOptPlanner)).

3 - Type

Two types of rules:

3.1 - Converter

  • Converters rule implement Converter and convert from one convention to an another.
  • Converter rules applied via convert

A ConverterRule converts between calling conventions.


  • indicates what system will actually execute the query by assigning a particular call.

3.2 - Transformer

A rule that match a subtree of a relational algebra expression and replace it with a different subtree. ie it is a rule to transform an relational expression to another.

Example: exchange the order of Filter and a Project nodes.

Match: Transformer Rules are matched to elements of a query plan using pattern matching. onMatch is called for matched rules


4 - List

5 - Documentation / Reference

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap