summaryrefslogtreecommitdiffstats
path: root/tests/fixtures/pretty.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-23 08:42:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-23 08:42:55 +0000
commitade4a78e8fabcaa7270b6d4be2187457a3fa115f (patch)
tree018225e76010479b3a568bb6d9ef5df457802885 /tests/fixtures/pretty.sql
parentAdding upstream version 10.5.2. (diff)
downloadsqlglot-ade4a78e8fabcaa7270b6d4be2187457a3fa115f.tar.xz
sqlglot-ade4a78e8fabcaa7270b6d4be2187457a3fa115f.zip
Adding upstream version 10.5.6.upstream/10.5.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/pretty.sql')
-rw-r--r--tests/fixtures/pretty.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/fixtures/pretty.sql b/tests/fixtures/pretty.sql
index 067fe77..64806eb 100644
--- a/tests/fixtures/pretty.sql
+++ b/tests/fixtures/pretty.sql
@@ -322,3 +322,23 @@ SELECT
* /* multi
line
comment */;
+WITH table_data AS (
+ SELECT 'bob' AS name, ARRAY['banana', 'apple', 'orange'] AS fruit_basket
+)
+SELECT
+ name,
+ fruit,
+ basket_index
+FROM table_data
+CROSS JOIN UNNEST(fruit_basket) AS fruit WITH OFFSET basket_index;
+WITH table_data AS (
+ SELECT
+ 'bob' AS name,
+ ARRAY('banana', 'apple', 'orange') AS fruit_basket
+)
+SELECT
+ name,
+ fruit,
+ basket_index
+FROM table_data
+CROSS JOIN UNNEST(fruit_basket) AS fruit WITH OFFSET AS basket_index;