Skip to content

Calcite Notes

Paul Rogers edited this page May 2, 2022 · 8 revisions

Terms

Basics

  • A custom schema is created with a SchemaFactory.
  • How is the schema factory registered from code?
  • The schema returns an instance of Table. If updatable, then ModifiableTable.
  • Also, to push operations, FilterableTable or ProjectableFilterableTable.
  • Table gives rise to TableScan.
  • Optimization done via planner rules.
  • Each engine implements its own variation of the operators.
  • Operators have "conventions" which is the calling convention. The built-in convention is the enumerable convention.

See slide 23 of this presentation:

  • SQL is parsed to 'SqlNode'. A converter produces RelNodes.

Other Notes

Calcite provides a planner, Planner and PlannerImpl which appears more of an example. Druid works around the fact that the validator is not visible, but has lots of useful information. Drill, for example, incorporates the functionality