Merging upstream version 26.15.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
2a79d9df75
commit
de6539b796
58 changed files with 4878 additions and 4677 deletions
tests
|
@ -533,6 +533,11 @@ class TestOptimizer(unittest.TestCase):
|
|||
def test_simplify(self):
|
||||
self.check_file("simplify", simplify)
|
||||
|
||||
# Ensure simplify mutates the AST properly
|
||||
expression = parse_one("SELECT 1 + 2")
|
||||
simplify(expression.selects[0])
|
||||
self.assertEqual(expression.sql(), "SELECT 3")
|
||||
|
||||
expression = parse_one("SELECT a, c, b FROM table1 WHERE 1 = 1")
|
||||
self.assertEqual(simplify(simplify(expression.find(exp.Where))).sql(), "WHERE TRUE")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue