summaryrefslogtreecommitdiffstats
path: root/tests/dataframe
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-20 08:50:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-20 08:50:35 +0000
commit6a22086850fc960715b618e82f4c2e43a4529146 (patch)
tree2005800d79fbd3b3a72ed36d10857fadd61306b7 /tests/dataframe
parentReleasing debian version 11.1.3-1. (diff)
downloadsqlglot-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.py9
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"