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:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-07 11:39:43 +0000
commit341eb1a6bdf0dd5b015e5140d3b068c6fd3f4d87 (patch)
tree61fb7eca2238fb5d41d3906f4af41de03abd25ea /tests/fixtures/optimizer/simplify.sql
parentAdding upstream version 17.12.0. (diff)
downloadsqlglot-341eb1a6bdf0dd5b015e5140d3b068c6fd3f4d87.tar.xz
sqlglot-341eb1a6bdf0dd5b015e5140d3b068c6fd3f4d87.zip
Adding upstream version 18.2.0.upstream/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
--------------------------------------