diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:50:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:50:25 +0000 |
commit | cf49728f719975144a958f23ba5f3336fb81ae55 (patch) | |
tree | 78aa5446e86cc5623808508ee167c9a476754939 /tests/test_optimizer.py | |
parent | Releasing debian version 23.10.0-1. (diff) | |
download | sqlglot-cf49728f719975144a958f23ba5f3336fb81ae55.tar.xz sqlglot-cf49728f719975144a958f23ba5f3336fb81ae55.zip |
Merging upstream version 23.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/test_optimizer.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py index c0b362c..758b60c 100644 --- a/tests/test_optimizer.py +++ b/tests/test_optimizer.py @@ -229,6 +229,17 @@ class TestOptimizer(unittest.TestCase): @patch("sqlglot.generator.logger") def test_qualify_columns(self, logger): self.assertEqual( + optimizer.qualify.qualify( + parse_one( + "SELECT `my_db.my_table`.`my_column` FROM `my_db.my_table`", + read="bigquery", + ), + dialect="bigquery", + ).sql(dialect="bigquery"), + "SELECT `my_table`.`my_column` AS `my_column` FROM `my_db.my_table` AS `my_table`", + ) + + self.assertEqual( optimizer.qualify_columns.qualify_columns( parse_one( "WITH RECURSIVE t AS (SELECT 1 AS x UNION ALL SELECT x + 1 FROM t AS child WHERE x < 10) SELECT * FROM t" |