diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 05:12:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 05:12:38 +0000 |
commit | 613c2506f59fefeb0c0b921ca361c65e99458139 (patch) | |
tree | e1207c41ee9b35d77f1608e87e568fe60d701cf6 /tests/fixtures/optimizer/simplify.sql | |
parent | Adding upstream version 18.17.0. (diff) | |
download | sqlglot-613c2506f59fefeb0c0b921ca361c65e99458139.tar.xz sqlglot-613c2506f59fefeb0c0b921ca361c65e99458139.zip |
Adding upstream version 19.0.1.upstream/19.0.1
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.sql | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/fixtures/optimizer/simplify.sql b/tests/fixtures/optimizer/simplify.sql index c53a972..f50f688 100644 --- a/tests/fixtures/optimizer/simplify.sql +++ b/tests/fixtures/optimizer/simplify.sql @@ -631,19 +631,19 @@ COALESCE(x); x; COALESCE(x, 1) = 2; -x = 2 AND NOT x IS NULL; +NOT x IS NULL AND x = 2; 2 = COALESCE(x, 1); 2 = x AND NOT x IS NULL; COALESCE(x, 1, 1) = 1 + 1; -x = 2 AND NOT x IS NULL; +NOT x IS NULL AND x = 2; COALESCE(x, 1, 2) = 2; -x = 2 AND NOT x IS NULL; +NOT x IS NULL AND x = 2; COALESCE(x, 3) <= 2; -x <= 2 AND NOT x IS NULL; +NOT x IS NULL AND x <= 2; COALESCE(x, 1) <> 2; x <> 2 OR x IS NULL; @@ -872,7 +872,7 @@ x = 5 AND y = x; x = 5 AND y = 5; 5 = x AND y = x; -y = 5 AND 5 = x; +5 = x AND y = 5; x = 5 OR y = x; x = 5 OR y = x; @@ -899,13 +899,13 @@ x = 5 AND x + 3 = 8; x = 5; x = 5 AND (SELECT x FROM t WHERE y = 1); -x = 5 AND (SELECT x FROM t WHERE y = 1); +(SELECT x FROM t WHERE y = 1) AND x = 5; x = 1 AND y > 0 AND (SELECT z = 5 FROM t WHERE y = 1); -x = 1 AND y > 0 AND (SELECT z = 5 FROM t WHERE y = 1); +(SELECT z = 5 FROM t WHERE y = 1) AND x = 1 AND y > 0; x = 1 AND x = y AND (SELECT z FROM t WHERE a AND (b OR c)); -x = 1 AND (SELECT z FROM t WHERE a AND (b OR c)) AND 1 = y; +(SELECT z FROM t WHERE a AND (b OR c)) AND 1 = y AND x = 1; t1.a = 39 AND t2.b = t1.a AND t3.c = t2.b; t1.a = 39 AND t2.b = 39 AND t3.c = 39; @@ -920,10 +920,10 @@ x = 1 AND CASE x WHEN 5 THEN FALSE ELSE TRUE END; x = 1; x = y AND CASE WHEN x = 5 THEN FALSE ELSE TRUE END; -x = y AND CASE WHEN x = 5 THEN FALSE ELSE TRUE END; +CASE WHEN x = 5 THEN FALSE ELSE TRUE END AND x = y; x = 1 AND CASE WHEN y = 5 THEN x = z END; -x = 1 AND CASE WHEN y = 5 THEN 1 = z END; +CASE WHEN y = 5 THEN 1 = z END AND x = 1; -------------------------------------- -- Simplify Conditionals |