summaryrefslogtreecommitdiffstats
path: root/tests/fixtures/optimizer/simplify.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:31:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:31:50 +0000
commit1fb60a37d31eacbac62ddafde51b829522925694 (patch)
tree5c04a33630f7a2cd4cff248e965053f97ec3e4ac /tests/fixtures/optimizer/simplify.sql
parentAdding upstream version 11.4.1. (diff)
downloadsqlglot-1fb60a37d31eacbac62ddafde51b829522925694.tar.xz
sqlglot-1fb60a37d31eacbac62ddafde51b829522925694.zip
Adding upstream version 11.4.5.upstream/11.4.5
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.sql16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/fixtures/optimizer/simplify.sql b/tests/fixtures/optimizer/simplify.sql
index 4e9e70c..08e8700 100644
--- a/tests/fixtures/optimizer/simplify.sql
+++ b/tests/fixtures/optimizer/simplify.sql
@@ -141,6 +141,9 @@ A OR C;
(A OR C) AND (A OR B OR C);
A OR C;
+A AND (B AND C) AND (D AND E);
+A AND B AND C AND D AND E;
+
--------------------------------------
-- Elimination
--------------------------------------
@@ -249,6 +252,12 @@ x = x;
(('a' = 'a') AND TRUE and NOT FALSE);
TRUE;
+(x = y) and z;
+x = y AND z;
+
+x * (1 - y);
+x * (1 - y);
+
--------------------------------------
-- Literals
--------------------------------------
@@ -310,7 +319,7 @@ TRUE;
8.0;
6 - 2 + 4 * 2 + a;
-12 + a;
+a + 12;
a + 1 + 1 + 2;
a + 4;
@@ -367,7 +376,7 @@ interval '1' year + date '1998-01-01';
CAST('1999-01-01' AS DATE);
interval '1' year + date '1998-01-01' + 3 * 7 * 4;
-CAST('1999-01-01' AS DATE) + 84;
+84 + CAST('1999-01-01' AS DATE);
date '1998-12-01' - interval '90' foo;
CAST('1998-12-01' AS DATE) - INTERVAL '90' foo;
@@ -554,3 +563,6 @@ x <= 10 AND x >= 9;
1 < x AND 3 < x;
x > 3;
+
+'a' < 'b';
+TRUE;