summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index 691beb9..ea38521 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -2426,3 +2426,18 @@ FROM c""",
"""CREATE TEMPORARY SEQUENCE seq START WITH = 1 INCREMENT BY = 2""",
"""CREATE TEMPORARY SEQUENCE seq START WITH 1 INCREMENT BY 2""",
)
+
+ def test_reserved_keywords(self):
+ order = exp.select("*").from_("order")
+
+ for dialect in ("presto", "redshift"):
+ dialect = Dialect.get_or_raise(dialect)
+ self.assertEqual(
+ order.sql(dialect=dialect),
+ f"SELECT * FROM {dialect.IDENTIFIER_START}order{dialect.IDENTIFIER_END}",
+ )
+
+ self.validate_identity(
+ """SELECT partition.d FROM t PARTITION (d)""",
+ """SELECT partition.d FROM t AS PARTITION(d)""",
+ )