summaryrefslogtreecommitdiffstats
path: root/tests/dataframe
diff options
context:
space:
mode:
Diffstat (limited to '')
-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"