Table of Contents

Calcite - Planner (RelOptPlanner)

About

Plan provides an optimizer interface (ie Defines interfaces for constructing rule-based optimizers of relational expressions)

Don't confound with the Frameworks Planner that is a utility tool for the query planning process

The planning process is extensible. You can add your own:

List

Volcano

The VolcanoPlanner is the default planner of Calcite. It's a CBO (Cost Based Optimizer) - It apply a set of rules to minimize the cost of executing a query.

It applies the rules iteratively, selecting the plan with the lowest cost on each iteration.

cost are provided by the relational expression

The optimization stops when the cost does not significantly improve after a number of iteration.

The Relational operators by default are logical operators (ie they don't have a specific implementation) Because the volcano operator is cost based, all logical operators must be converted to physical operators to calculate an estimated cost.

Each physical operator in Calcite has a calling convention which specifies how the query will actually be executed.

Hep

HepPlanner is a heuristic optimizer similar to Spark Optimizer.

Factory

Documentation / Reference