summaryrefslogtreecommitdiffstats
path: root/tests/test_optimizer.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 13:44:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 13:44:59 +0000
commitef2db38de92f2329c1c366318bddfc7e3dee8415 (patch)
treedee41de1eb0e05f2f6805b77df41a71b3aa66ec2 /tests/test_optimizer.py
parentAdding upstream version 11.0.1. (diff)
downloadsqlglot-ef2db38de92f2329c1c366318bddfc7e3dee8415.tar.xz
sqlglot-ef2db38de92f2329c1c366318bddfc7e3dee8415.zip
Adding upstream version 11.1.3.upstream/11.1.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_optimizer.py')
-rw-r--r--tests/test_optimizer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py
index b6993ba..8ddd95f 100644
--- a/tests/test_optimizer.py
+++ b/tests/test_optimizer.py
@@ -175,7 +175,7 @@ class TestOptimizer(unittest.TestCase):
def pushdown_projections(expression, **kwargs):
expression = optimizer.qualify_tables.qualify_tables(expression)
expression = optimizer.qualify_columns.qualify_columns(expression, **kwargs)
- expression = optimizer.pushdown_projections.pushdown_projections(expression)
+ expression = optimizer.pushdown_projections.pushdown_projections(expression, **kwargs)
return expression
self.check_file("pushdown_projections", pushdown_projections, schema=self.schema)
@@ -519,6 +519,8 @@ FROM READ_CSV('tests/fixtures/optimizer/tpc-h/nation.csv.gz', 'delimiter', '|')
concat_expr.right.expressions[0].type.this, exp.DataType.Type.VARCHAR
) # x.cola (arg)
+ annotate_types(parse_one("select x from y lateral view explode(y) as x")).expressions[0]
+
def test_null_annotation(self):
expression = annotate_types(parse_one("SELECT NULL + 2 AS col")).expressions[0].this
self.assertEqual(expression.left.type.this, exp.DataType.Type.NULL)