summaryrefslogtreecommitdiffstats
path: root/tests/fixtures/optimizer/simplify.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-07 11:39:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-07 11:39:48 +0000
commitf73e9af131151f1e058446361c35b05c4c90bf10 (patch)
treeed425b89f12d3f5e4709290bdc03d876f365bc97 /tests/fixtures/optimizer/simplify.sql
parentReleasing debian version 17.12.0-1. (diff)
downloadsqlglot-f73e9af131151f1e058446361c35b05c4c90bf10.tar.xz
sqlglot-f73e9af131151f1e058446361c35b05c4c90bf10.zip
Merging upstream version 18.2.0.
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.sql15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/simplify.sql b/tests/fixtures/optimizer/simplify.sql
index 3ed02cd..66fb19c 100644
--- a/tests/fixtures/optimizer/simplify.sql
+++ b/tests/fixtures/optimizer/simplify.sql
@@ -264,6 +264,9 @@ TRUE;
(FALSE);
FALSE;
+((TRUE));
+TRUE;
+
(FALSE OR TRUE);
TRUE;
@@ -288,6 +291,9 @@ x = y AND z;
x * (1 - y);
x * (1 - y);
+(((x % 20) = 0) = TRUE);
+((x % 20) = 0) = TRUE;
+
--------------------------------------
-- Literals
--------------------------------------
@@ -612,6 +618,9 @@ TRUE;
x = 2018 OR x <> 2018;
x <> 2018 OR x = 2018;
+t0.x = t1.x AND t0.y < t1.y AND t0.y <= t1.y;
+t0.x = t1.x AND t0.y < t1.y AND t0.y <= t1.y;
+
--------------------------------------
-- Coalesce
--------------------------------------
@@ -645,6 +654,12 @@ x = 1 OR x IS NULL;
COALESCE(x, 1) IS NULL;
FALSE;
+COALESCE(ROW() OVER (), 1) = 1;
+ROW() OVER () = 1 OR ROW() OVER () IS NULL;
+
+a AND b AND COALESCE(ROW() OVER (), 1) = 1;
+a AND b AND (ROW() OVER () = 1 OR ROW() OVER () IS NULL);
+
--------------------------------------
-- CONCAT
--------------------------------------