diff options
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r-- | tests/dialects/test_dialect.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py index b50fec8..5faed51 100644 --- a/tests/dialects/test_dialect.py +++ b/tests/dialects/test_dialect.py @@ -1108,6 +1108,11 @@ class TestDialect(Validator): ) def test_order_by(self): + self.validate_identity( + "SELECT c FROM t ORDER BY a, b,", + "SELECT c FROM t ORDER BY a, b", + ) + self.validate_all( "SELECT fname, lname, age FROM person ORDER BY age DESC NULLS FIRST, fname ASC NULLS LAST, lname", write={ @@ -1777,7 +1782,7 @@ class TestDialect(Validator): "CREATE TABLE t (c CHAR, nc NCHAR, v1 VARCHAR, v2 VARCHAR2, nv NVARCHAR, nv2 NVARCHAR2)", write={ "duckdb": "CREATE TABLE t (c TEXT, nc TEXT, v1 TEXT, v2 TEXT, nv TEXT, nv2 TEXT)", - "hive": "CREATE TABLE t (c CHAR, nc CHAR, v1 STRING, v2 STRING, nv STRING, nv2 STRING)", + "hive": "CREATE TABLE t (c STRING, nc STRING, v1 STRING, v2 STRING, nv STRING, nv2 STRING)", "oracle": "CREATE TABLE t (c CHAR, nc NCHAR, v1 VARCHAR2, v2 VARCHAR2, nv NVARCHAR2, nv2 NVARCHAR2)", "postgres": "CREATE TABLE t (c CHAR, nc CHAR, v1 VARCHAR, v2 VARCHAR, nv VARCHAR, nv2 VARCHAR)", "sqlite": "CREATE TABLE t (c TEXT, nc TEXT, v1 TEXT, v2 TEXT, nv TEXT, nv2 TEXT)", @@ -2301,3 +2306,9 @@ SELECT "tsql": UnsupportedError, }, ) + + def test_truncate(self): + self.validate_identity("TRUNCATE TABLE table") + self.validate_identity("TRUNCATE TABLE db.schema.test") + self.validate_identity("TRUNCATE TABLE IF EXISTS db.schema.test") + self.validate_identity("TRUNCATE TABLE t1, t2, t3") |