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 more