From 2d4657dbba42ff38ad3db64e494a9cf89df98c07 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 12 Feb 2024 07:15:45 +0100 Subject: Merging upstream version 21.0.2. Signed-off-by: Daniel Baumann --- tests/test_optimizer.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/test_optimizer.py') diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index d0ef8aa..0e8a803 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -980,6 +980,12 @@ FROM READ_CSV('tests/fixtures/optimizer/tpc-h/nation.csv.gz', 'delimiter', '|') self.assertEqual(expression.selects[0].type.sql(dialect="bigquery"), "STRUCT<`f` STRING>") + expression = annotate_types( + parse_one("SELECT unnest(t.x) FROM t AS t", dialect="postgres"), + schema={"t": {"x": "array"}}, + ) + self.assertTrue(expression.selects[0].is_type("int")) + def test_type_annotation_cache(self): sql = "SELECT 1 + 1" expression = annotate_types(parse_one(sql)) -- cgit v1.2.3