summaryrefslogtreecommitdiffstats
path: root/tests/fixtures/optimizer/simplify.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:34:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:34:56 +0000
commit278f416d08028bd175e1d6433739461f2168f4e2 (patch)
tree12492ebc5907744b2a4297228324fcda9ee2e40f /tests/fixtures/optimizer/simplify.sql
parentAdding upstream version 24.1.0. (diff)
downloadsqlglot-278f416d08028bd175e1d6433739461f2168f4e2.tar.xz
sqlglot-278f416d08028bd175e1d6433739461f2168f4e2.zip
Adding upstream version 25.0.3.upstream/25.0.3
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.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/simplify.sql b/tests/fixtures/optimizer/simplify.sql
index 75abc38..87b42d1 100644
--- a/tests/fixtures/optimizer/simplify.sql
+++ b/tests/fixtures/optimizer/simplify.sql
@@ -113,6 +113,9 @@ a AND b;
A XOR A;
FALSE;
+TRUE AND TRUE OR TRUE AND FALSE;
+TRUE;
+
--------------------------------------
-- Absorption
--------------------------------------
@@ -158,6 +161,12 @@ A OR C;
A AND (B AND C) AND (D AND E);
A AND B AND C AND D AND E;
+A AND (A OR B) AND (A OR B OR C);
+A;
+
+(A OR B) AND (A OR C) AND (A OR B OR C);
+(A OR B) AND (A OR C);
+
--------------------------------------
-- Elimination
--------------------------------------
@@ -194,6 +203,15 @@ NOT A;
E OR (A AND B) OR C OR D OR (A AND NOT B);
A OR C OR D OR E;
+(A AND B) OR (A AND NOT B) OR (A AND NOT B);
+A;
+
+(A AND B) OR (A AND B) OR (A AND NOT B);
+A;
+
+(A AND B) OR (A AND NOT B) OR (A AND B) OR (A AND NOT B);
+A;
+
--------------------------------------
-- Associativity
--------------------------------------