From f10d022e11dcd1015db1a74ce9f4198ebdcb7f40 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Mon, 16 Oct 2023 13:37:39 +0200
Subject: Merging upstream version 18.13.0.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 tests/fixtures/optimizer/optimizer.sql | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

(limited to 'tests/fixtures/optimizer/optimizer.sql')

diff --git a/tests/fixtures/optimizer/optimizer.sql b/tests/fixtures/optimizer/optimizer.sql
index 4cc62c9..a812bc5 100644
--- a/tests/fixtures/optimizer/optimizer.sql
+++ b/tests/fixtures/optimizer/optimizer.sql
@@ -15,6 +15,35 @@ SELECT
   "q"."x" AS "x"
 FROM UNNEST(ARRAY(1, 2)) AS "q"("x", "y");
 
+# title: explode_outer
+# dialect: spark
+# execute: false
+CREATE OR REPLACE TEMPORARY VIEW latest_boo AS
+SELECT
+    TRIM(split(points, ':')[0]) as points_type,
+    TRIM(split(points, ':')[1]) as points_value
+FROM (
+         SELECT
+             explode_outer(split(object_pointsText, ',')) as points
+         FROM (
+                  SELECT
+                      object_pointstext,
+                  FROM boo
+              )
+         WHERE object_pointstext IS NOT NULL
+     );
+CREATE OR REPLACE TEMPORARY VIEW `latest_boo` AS
+SELECT
+  TRIM(SPLIT(`_q_1`.`points`, ':')[0]) AS `points_type`,
+  TRIM(SPLIT(`_q_1`.`points`, ':')[1]) AS `points_value`
+FROM (
+  SELECT
+    EXPLODE_OUTER(SPLIT(`boo`.`object_pointstext`, ',')) AS `points`
+  FROM `boo` AS `boo`
+  WHERE
+    NOT `boo`.`object_pointstext` IS NULL
+) AS `_q_1`;
+
 # title: Union in CTE
 WITH cte AS (
     (
-- 
cgit v1.2.3

