We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85e62b8 commit fe6fdbeCopy full SHA for fe6fdbe
tests/test_optimizer.py
@@ -533,6 +533,11 @@ def test_pushdown_projection(self):
533
def test_simplify(self):
534
self.check_file("simplify", simplify)
535
536
+ # Ensure simplify mutates the AST properly
537
+ expression = parse_one("SELECT 1 + 2")
538
+ simplify(expression.selects[0])
539
+ self.assertEqual(expression.sql(), "SELECT 3")
540
+
541
expression = parse_one("SELECT a, c, b FROM table1 WHERE 1 = 1")
542
self.assertEqual(simplify(simplify(expression.find(exp.Where))).sql(), "WHERE TRUE")
543
0 commit comments