summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_snowflake.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-30 08:03:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-30 08:03:55 +0000
commit5510bab2f2724b1785efb5e4be0e4fa1e0afbf9e (patch)
tree8f11dc162604c83298116ce6ac23d64492e2c189 /tests/dialects/test_snowflake.py
parentAdding upstream version 16.7.3. (diff)
downloadsqlglot-5510bab2f2724b1785efb5e4be0e4fa1e0afbf9e.tar.xz
sqlglot-5510bab2f2724b1785efb5e4be0e4fa1e0afbf9e.zip
Adding upstream version 16.7.7.upstream/16.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_snowflake.py')
-rw-r--r--tests/dialects/test_snowflake.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py
index 4d2c392..e9826a6 100644
--- a/tests/dialects/test_snowflake.py
+++ b/tests/dialects/test_snowflake.py
@@ -550,7 +550,17 @@ class TestSnowflake(Validator):
"snowflake": "DATEADD(DAY, 5, CAST('2008-12-25' AS DATE))",
},
)
- self.validate_identity("DATEDIFF(DAY, 5, CAST('2008-12-25' AS DATE))")
+ self.validate_identity(
+ "DATEDIFF(DAY, CAST('2007-12-25' AS DATE), CAST('2008-12-25' AS DATE))"
+ )
+ self.validate_identity(
+ "TIMEDIFF(DAY, CAST('2007-12-25' AS DATE), CAST('2008-12-25' AS DATE))",
+ "DATEDIFF(DAY, CAST('2007-12-25' AS DATE), CAST('2008-12-25' AS DATE))",
+ )
+ self.validate_identity(
+ "TIMESTAMPDIFF(DAY, CAST('2007-12-25' AS DATE), CAST('2008-12-25' AS DATE))",
+ "DATEDIFF(DAY, CAST('2007-12-25' AS DATE), CAST('2008-12-25' AS DATE))",
+ )
def test_semi_structured_types(self):
self.validate_identity("SELECT CAST(a AS VARIANT)")