Calcite’s foundation is a comprehensive implementation of relational algebra (together with transformation rules, cost model, and metadata) but to create algebra expressions you had to master a complex API.
We’re solving this problem by introducing an algebra builder, a single class with all the methods you need to build any relational expression.
creates the algebra
which is equivalent to the SQL
The algebra builder documentation describes the full API and has lots of examples.
We’re still working on the algebra builder, but plan to release it with Calcite 1.4 (see [CALCITE-748]).
The algebra builder will make some existing tasks easier (such as writing planner rules), but will also enable new things, such as writing applications directly on top of Calcite, or implementing non-SQL query languages. These applications and languages will be able to take advantage of Calcite’s existing back-ends (including Hive-on-Tez, Drill, MongoDB, Splunk, Spark, JDBC data sources) and extensive set of query-optimization rules.
If you have questions or comments, please post to the mailing list.