diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-20 08:50:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-20 08:50:35 +0000 |
commit | 6a22086850fc960715b618e82f4c2e43a4529146 (patch) | |
tree | 2005800d79fbd3b3a72ed36d10857fadd61306b7 /tests/dataframe | |
parent | Releasing debian version 11.1.3-1. (diff) | |
download | sqlglot-6a22086850fc960715b618e82f4c2e43a4529146.tar.xz sqlglot-6a22086850fc960715b618e82f4c2e43a4529146.zip |
Merging upstream version 11.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dataframe')
-rw-r--r-- | tests/dataframe/unit/test_session.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/dataframe/unit/test_session.py b/tests/dataframe/unit/test_session.py index 5213667..f5b79fd 100644 --- a/tests/dataframe/unit/test_session.py +++ b/tests/dataframe/unit/test_session.py @@ -81,6 +81,15 @@ class TestDataframeSession(DataFrameSQLValidator): ) @mock.patch("sqlglot.schema", MappingSchema()) + def test_select_quoted(self): + sqlglot.schema.add_table('"TEST"', {"name": "string"}) + + self.assertEqual( + SparkSession().table('"TEST"').select(F.col("name")).sql(dialect="snowflake")[0], + '''SELECT "TEST"."name" AS "name" FROM "TEST" AS "TEST"''', + ) + + @mock.patch("sqlglot.schema", MappingSchema()) def test_sql_with_aggs(self): # TODO: Do exact matches once CTE names are deterministic query = "SELECT cola, colb FROM table" |