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/dialects/test_dialect.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/dialects/test_dialect.py | 15 |
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)""", + ) |