Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Master Mentor

Original Post

Calcite is a highly customizable engine for parsing and planning queries on data in a wide variety of formats. It allows database-like access, and in particular a SQL interface and advanced query optimization, for datanot residing in a traditional database.

Apache Calcite is a dynamic data management framework.

It contains many of the pieces that comprise a typical database management system, but omits some key functions: storage of data, algorithms to process data, and a repository for storing metadata.

Calcite intentionally stays out of the business of storing and processing data. As we shall see, this makes it an excellent choice for mediating between applications and one or more data storage locations and data processing engines. It is also a perfect foundation for building a database: just add data. Source

Tutorial https://calcite.apache.org/docs/tutorial.html

3453-aaeaaqaaaaaaaafeaaaajgiymduxmzi0lwnjytatndc4zc05nt.png

Demo:

Read DEPT and EMPS table

Create a test table based on existing csv example. Read the tutorial link to understand the model.json and schema.

In the demo, you can see that I am running explain plan on the queries and then I used smart.json to change the plan.

Watch the demo and then read the following links

model.json https://calcite.apache.org/docs/tutorial.html#schema-discovery

Query tuning https://calcite.apache.org/docs/tutorial.html#optimizing-queries-using-planner-rules

Calcite https://calcite.apache.org/

This page describes the SQL dialect recognized by Calcite’s default SQL parser.

Adapters

JDBC driver

Calcite is embedded in Drill, Hive and Kylin.

11,276 Views