diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:50:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:50:25 +0000 |
commit | cf49728f719975144a958f23ba5f3336fb81ae55 (patch) | |
tree | 78aa5446e86cc5623808508ee167c9a476754939 /tests/fixtures/optimizer/qualify_columns.sql | |
parent | Releasing debian version 23.10.0-1. (diff) | |
download | sqlglot-cf49728f719975144a958f23ba5f3336fb81ae55.tar.xz sqlglot-cf49728f719975144a958f23ba5f3336fb81ae55.zip |
Merging upstream version 23.12.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/fixtures/optimizer/qualify_columns.sql | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/fixtures/optimizer/qualify_columns.sql b/tests/fixtures/optimizer/qualify_columns.sql index 8baf961..b020a27 100644 --- a/tests/fixtures/optimizer/qualify_columns.sql +++ b/tests/fixtures/optimizer/qualify_columns.sql @@ -494,8 +494,13 @@ SELECT x AS x, y AS y FROM UNNEST([1, 2]) AS x WITH OFFSET AS y; # dialect: bigquery # execute: false -select x, a, x.a from unnest([STRUCT(1 AS a)]) as x; -SELECT x AS x, a AS a, x.a AS a FROM UNNEST([STRUCT(1 AS a)]) AS x; +select x, a, x.a from unnest([STRUCT(1 AS a)]) as x CROSS JOIN m; +SELECT x AS x, a AS a, x.a AS a FROM UNNEST([STRUCT(1 AS a)]) AS x CROSS JOIN m AS m; + +# dialect: bigquery +# execute: false +WITH cte AS (SELECT [STRUCT(1 AS a)] AS x) select a, x, m.a from cte, UNNEST(x) AS m CROSS JOIN n; +WITH cte AS (SELECT [STRUCT(1 AS a)] AS x) SELECT a AS a, cte.x AS x, m.a AS a FROM cte AS cte, UNNEST(cte.x) AS m CROSS JOIN n AS n; # dialect: presto SELECT x.a, i.b FROM x CROSS JOIN UNNEST(SPLIT(CAST(b AS VARCHAR), ',')) AS i(b); |