summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_databricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_databricks.py')
-rw-r--r--tests/dialects/test_databricks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py
index 8bb88b3..7c13e79 100644
--- a/tests/dialects/test_databricks.py
+++ b/tests/dialects/test_databricks.py
@@ -131,7 +131,7 @@ class TestDatabricks(Validator):
"SELECT DATEDIFF(week, 'start', 'end')",
write={
"databricks": "SELECT DATEDIFF(week, 'start', 'end')",
- "postgres": "SELECT CAST(EXTRACT(year FROM AGE(CAST('end' AS TIMESTAMP), CAST('start' AS TIMESTAMP))) * 48 + EXTRACT(month FROM AGE(CAST('end' AS TIMESTAMP), CAST('start' AS TIMESTAMP))) * 4 + EXTRACT(day FROM AGE(CAST('end' AS TIMESTAMP), CAST('start' AS TIMESTAMP))) / 7 AS BIGINT)",
+ "postgres": "SELECT CAST(EXTRACT(days FROM (CAST('end' AS TIMESTAMP) - CAST('start' AS TIMESTAMP))) / 7 AS BIGINT)",
},
)
self.validate_all(