Transform the syntax tree parsed by SQL into logical plans, logical optimizations, and physical plans.
SQL parsing using Antlr4
mvn clean compile -pl antlr
Generated code location :antlr/target/generated-sources/antlr4
There are currently three logical plan optimizers
org.apache.iotdb.db.qp.strategy.optimizer.ConcatPathOptimizer
The path optimizer splices query paths in SQL, interacts with MManager, removes wildcards, and performs path checking.
org.apache.iotdb.db.qp.strategy.optimizer.RemoveNotOptimizer
The predicate de-optimizer removes the non-operators in the predicate logic.
org.apache.iotdb.db.qp.strategy.optimizer.DnfFilterOptimizer
Turn predicates into disjunctive normal form.
org.apache.iotdb.db.qp.strategy.optimizer.MergeSingleFilterOptimizer
Combine predicates of the same path logically.