Simplify/flatten composite Boolean expressions
The new ANTLRv4 parser generates left-deep nested Boolean AND/OR expressions, which need to be flattened where appropriate. The BooleanOperator.simplify() method takes care of this operation. Introducing this flattening/simplification everywhere all at once seemed to be inadvisable, so currently it is only applied in the query AST when schemas are computed. Additionally, only WHERE predicates, HAVING predicates, and ON clauses are simplified/flattened. (NATURAL JOIN and USING join predicates are generated programmatically, not by the parser, and are already flattened.)
Showing
+14 -2
Please register or sign in to comment