Apache Calcite

Apache Calcite : Evaluating REX Expressions

Reading Time: 2 minutes Apache Calcite is a dynamic data management framework. It provides a SQL parser, validator and optimizer. Using the sub-project Avatica we also have the ability to execute our optimized queries against external databases. Every row expression (rex) in a SQL query is defined as a ‘RexNode’ internally which can be an identifier,a literal or a function.In this blog we will illustrate evaluating functions involving literals 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