summaryrefslogtreecommitdiffstats
path: root/tests/test_optimizer.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 13:45:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 13:45:09 +0000
commit639a208fa57ea674d165c4837e96f3ae4d7e3e61 (patch)
treef4d66da146c396d407cecefb5b405e609af1109e /tests/test_optimizer.py
parentReleasing debian version 11.0.1-1. (diff)
downloadsqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.tar.xz
sqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.zip
Merging upstream version 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)