summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_tsql.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 07:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 07:23:18 +0000
commit9c5cf7fc4a20988d0eda33e4a3afdf7168c05104 (patch)
tree85160e0a3a39feede46b7546566279525b3af373 /tests/dialects/test_tsql.py
parentReleasing debian version 25.31.4-1. (diff)
downloadsqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.tar.xz
sqlglot-9c5cf7fc4a20988d0eda33e4a3afdf7168c05104.zip
Merging upstream version 25.32.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_tsql.py')
-rw-r--r--tests/dialects/test_tsql.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/dialects/test_tsql.py b/tests/dialects/test_tsql.py
index e4bd9a7..094e5f2 100644
--- a/tests/dialects/test_tsql.py
+++ b/tests/dialects/test_tsql.py
@@ -1308,6 +1308,12 @@ WHERE
},
)
+ for fmt in ("WEEK", "WW", "WK"):
+ self.validate_identity(
+ f"SELECT DATEPART({fmt}, '2024-11-21')",
+ "SELECT DATEPART(WK, CAST('2024-11-21' AS DATETIME2))",
+ )
+
def test_convert(self):
self.validate_all(
"CONVERT(NVARCHAR(200), x)",