diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 08:03:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 08:03:58 +0000 |
commit | 9f19773cebdc9476f2a3266d3c01c967c38fcd1e (patch) | |
tree | a60f607ba2bb64fb45da86c297ff29ffc9b92f58 /tests/fixtures/optimizer/optimizer.sql | |
parent | Releasing debian version 16.7.3-1. (diff) | |
download | sqlglot-9f19773cebdc9476f2a3266d3c01c967c38fcd1e.tar.xz sqlglot-9f19773cebdc9476f2a3266d3c01c967c38fcd1e.zip |
Merging upstream version 16.7.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/fixtures/optimizer/optimizer.sql | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/optimizer.sql b/tests/fixtures/optimizer/optimizer.sql index f71ddde..38e64d7 100644 --- a/tests/fixtures/optimizer/optimizer.sql +++ b/tests/fixtures/optimizer/optimizer.sql @@ -693,3 +693,11 @@ GROUP BY "x"."a" + 1 + 1 HAVING "x"."a" + 1 + 1 + 1 + 1 > 1; + +# title: replace alias with mult expression without wrapping it +WITH cte AS (SELECT a * b AS c, a AS d, b as e FROM x) SELECT c + d - (c - e) AS f FROM cte; +SELECT + "x"."a" * "x"."b" + "x"."a" - ( + "x"."a" * "x"."b" - "x"."b" + ) AS "f" +FROM "x" AS "x"; |