summaryrefslogtreecommitdiffstats
path: root/tests/fixtures/optimizer/simplify.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-17 10:32:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-17 10:32:12 +0000
commit244a05de60c9417daab9528b51788c3d2a00dc5f (patch)
tree89a9c82aa41d397e1b81c320ad7a287b6c80f313 /tests/fixtures/optimizer/simplify.sql
parentAdding upstream version 10.4.2. (diff)
downloadsqlglot-244a05de60c9417daab9528b51788c3d2a00dc5f.tar.xz
sqlglot-244a05de60c9417daab9528b51788c3d2a00dc5f.zip
Adding upstream version 10.5.2.upstream/10.5.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/optimizer/simplify.sql')
-rw-r--r--tests/fixtures/optimizer/simplify.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/simplify.sql b/tests/fixtures/optimizer/simplify.sql
index cf4195d..4e9e70c 100644
--- a/tests/fixtures/optimizer/simplify.sql
+++ b/tests/fixtures/optimizer/simplify.sql
@@ -375,6 +375,18 @@ CAST('1998-12-01' AS DATE) - INTERVAL '90' foo;
date '1998-12-01' + interval '90' foo;
CAST('1998-12-01' AS DATE) + INTERVAL '90' foo;
+CAST(x AS DATE) + interval '1' week;
+CAST(x AS DATE) + INTERVAL '1' week;
+
+CAST('2008-11-11' AS DATETIME) + INTERVAL '5' MONTH;
+CAST('2009-04-11 00:00:00' AS DATETIME);
+
+datetime '1998-12-01' - interval '90' day;
+CAST('1998-09-02 00:00:00' AS DATETIME);
+
+CAST(x AS DATETIME) + interval '1' week;
+CAST(x AS DATETIME) + INTERVAL '1' week;
+
--------------------------------------
-- Comparisons
--------------------------------------