diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 20:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 20:08:03 +0000 |
commit | cf606e6b9c2bd703d35537ef8880a8b80edf52a5 (patch) | |
tree | ac3c8e940fabdaa513920df2a58284fe4e8c84ee /tests/test_optimizer.py | |
parent | Releasing debian version 24.0.0-1. (diff) | |
download | sqlglot-cf606e6b9c2bd703d35537ef8880a8b80edf52a5.tar.xz sqlglot-cf606e6b9c2bd703d35537ef8880a8b80edf52a5.zip |
Merging upstream version 24.1.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/test_optimizer.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index 36768f8..7ec0872 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -317,6 +317,18 @@ class TestOptimizer(unittest.TestCase): 'WITH "t" AS (SELECT 1 AS "c") (SELECT "t"."c" AS "c" FROM "t" AS "t")', ) + self.assertEqual( + optimizer.qualify_columns.qualify_columns( + parse_one( + "WITH tbl1 AS (SELECT STRUCT(1 AS `f0`, 2 as f1) AS col) SELECT tbl1.col.* from tbl1", + dialect="bigquery", + ), + schema=MappingSchema(schema=None, dialect="bigquery"), + infer_schema=False, + ).sql(dialect="bigquery"), + "WITH tbl1 AS (SELECT STRUCT(1 AS `f0`, 2 AS f1) AS col) SELECT tbl1.col.`f0` AS `f0`, tbl1.col.f1 AS f1 FROM tbl1", + ) + self.check_file( "qualify_columns", qualify_columns, execute=True, schema=self.schema, set_dialect=True ) |