summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_duckdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_duckdb.py')
-rw-r--r--tests/dialects/test_duckdb.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/dialects/test_duckdb.py b/tests/dialects/test_duckdb.py
index 0b13a70..9105a49 100644
--- a/tests/dialects/test_duckdb.py
+++ b/tests/dialects/test_duckdb.py
@@ -652,8 +652,14 @@ class TestDuckDB(Validator):
"SELECT CAST('2020-05-06' AS DATE) + INTERVAL 5 DAY",
read={"bigquery": "SELECT DATE_ADD(CAST('2020-05-06' AS DATE), INTERVAL 5 DAY)"},
)
- self.validate_identity("SELECT PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY y DESC) FROM t")
- self.validate_identity("SELECT PERCENTILE_DISC(0.25) WITHIN GROUP (ORDER BY y DESC) FROM t")
+ self.validate_identity(
+ "SELECT PERCENTILE_CONT(0.25) WITHIN GROUP (ORDER BY y DESC) FROM t",
+ "SELECT QUANTILE_CONT(y, 0.25 ORDER BY y DESC) FROM t",
+ )
+ self.validate_identity(
+ "SELECT PERCENTILE_DISC(0.25) WITHIN GROUP (ORDER BY y DESC) FROM t",
+ "SELECT QUANTILE_DISC(y, 0.25 ORDER BY y DESC) FROM t",
+ )
self.validate_all(
"SELECT QUANTILE_CONT(x, q) FROM t",
write={
@@ -1075,6 +1081,15 @@ class TestDuckDB(Validator):
write={
"snowflake": "ALTER TABLE db.t1 RENAME TO db.t2",
"duckdb": "ALTER TABLE db.t1 RENAME TO t2",
+ "tsql": "EXEC sp_rename 'db.t1', 't2'",
+ },
+ )
+ self.validate_all(
+ 'ALTER TABLE "db"."t1" RENAME TO "db"."t2"',
+ write={
+ "snowflake": 'ALTER TABLE "db"."t1" RENAME TO "db"."t2"',
+ "duckdb": 'ALTER TABLE "db"."t1" RENAME TO "t2"',
+ "tsql": "EXEC sp_rename '[db].[t1]', 't2'",
},
)