Apache Calcite

Apache Calcite : A Quick insight on Cost-based Optimization

Reading Time: 3 minutes Hello folks , In this blog , We will discuss about what is Query Optimization,what is a plan cost is , how we can use to drive optimizer decisions and Issues In Cost-Based Optimization. What is Query Optimization: We can execute a single query through different algorithms or re-written in different forms and structures. Hence, the question of query optimization comes into the picture – Continue Reading

Apache calcite : How to produced physical(Optimised) tree.

Reading Time: 3 minutes In this blog we are going to see how we can create the physical(Optimised) tree for a given query with the help of Apache calcite. What is Apache Calcite Apache Calcite is a dynamic data management framework with SQL parser, optimiser, executor, and JDBC driver. How Apache Calcite work Suppose We have one table and now we need to perform a SQL Query. but the problem is Continue Reading

Exploring HepPlanner for Apache Calcite

Reading Time: 3 minutes In this blog, we will see different ways to manipulate a rel node tree using a Hep planner. A basic understanding of Apache Calcite is necessary for this. Check out the homepage here https://calcite.apache.org/ What is a HepPlanner? It is a rule-based planner to transform a relational expression represented as a tree-like structure. It allows us to specify a condition to identify particular nodes of Continue Reading

Apache Calcite : Adding custom types and functions

Reading Time: 2 minutes Introduction In this blog we will introduce a custom function and type in our SQL . In the end,we want to parse,validate and convert to a relational node for a simple query like“SELECT CAST(my_custom_function(name) as my_custom_type) FROM SAMPLE” . Setting up the basics A sample schema First we need a simple table named Sample : Sample(ID int not null,NAME varchar not null) FrameworkConfig Next we Continue Reading

Generate logical plan in Calcite

Reading Time: 2 minutes Hello everyone! in the previous blog of Apache Calcite we discussed how Apache Calcite helps you to parse the database query and some basics. In this blog, we will discuss how to generate the logical plan of the database query you have written. What is logical plan A logical plan is a relational expression with only a logical operator. Logical algebra has no implementation of the relational operator and therefore Continue Reading