summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_tsql.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-23 19:51:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-23 19:51:10 +0000
commita95fd7b7de8c3492d8267b2007508d579ff50848 (patch)
treef17b76df363f98cda7ec9e8327e7c78a4c7f7803 /tests/dialects/test_tsql.py
parentReleasing debian version 26.0.0-1. (diff)
downloadsqlglot-a95fd7b7de8c3492d8267b2007508d579ff50848.tar.xz
sqlglot-a95fd7b7de8c3492d8267b2007508d579ff50848.zip
Merging upstream version 26.0.1.
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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dialects/test_tsql.py b/tests/dialects/test_tsql.py
index 6136599..e8cd696 100644
--- a/tests/dialects/test_tsql.py
+++ b/tests/dialects/test_tsql.py
@@ -1579,6 +1579,11 @@ WHERE
},
)
+ self.validate_identity(
+ "SELECT DATEADD(DAY, DATEDIFF(DAY, -3, GETDATE()), '08:00:00')",
+ "SELECT DATEADD(DAY, DATEDIFF(DAY, CAST('1899-12-29' AS DATETIME2), CAST(GETDATE() AS DATETIME2)), '08:00:00')",
+ )
+
def test_lateral_subquery(self):
self.validate_all(
"SELECT x.a, x.b, t.v, t.y FROM x CROSS APPLY (SELECT v, y FROM t) t(v, y)",