Posts
A SQL query compiler from scratch in Rust (step by step): Part two, the query rewrite driver
In the previous post of this series we introduced a couple of very basic rewrite rules. In this one we are going to take a look at the rule application driver, responsible for applying a set of rules while traversing the query graph until the query settles in a fix point.
The rules we have seen so far implement a SingleReplacementRule trait with an apply method that given a node may return a new node that must be used to replace the given one in the query graph.
read morePosts
A SQL query compiler from scratch in Rust (step by step): Part one, the query plan representation
One of my favorite books is Crafting Interpreters by Robert Nystrom, a very practical book that walks you through the process of building an interpreted programming language. In the same spirit, I thought it would be fun to write a series of blog spots as I go through the process of writing a new query compiler from scratch once again. After having worked in several query compilers, and written a few others for learning purposes (such as this one), I really believe in failing better every time and learning in the process.
read more