Skip to content

Commit

Permalink
[SPARK-42791][SQL][FOLLOWUP] Re-generate golden files for `array_prep…
Browse files Browse the repository at this point in the history
…end`

### What changes were proposed in this pull request?
This pr re-generates golden files for `array_prepend` functions. It seems that the newly added case in #38947 is missing from the golden files due to lack of rebase when merging #40449.

### Why are the changes needed?
 Re-generates golden files for `array_prepend` functions to Pass GitHub Actions

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

- Pass GitHub Actions
- Manually checked with Scala 2.13

Closes #40492 from LuciferYang/SPARK-42791-FOLLOWUP.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
  • Loading branch information
LuciferYang authored and MaxGekk committed Mar 20, 2023
1 parent 67a254c commit 04333bb
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,3 +657,66 @@ select array_append(array(CAST(NULL AS String)), CAST(NULL AS String))
-- !query analysis
Project [array_append(array(cast(null as string)), cast(null as string)) AS array_append(array(CAST(NULL AS STRING)), CAST(NULL AS STRING))#x]
+- OneRowRelation


-- !query
select array_prepend(array(1, 2, 3), 4)
-- !query analysis
Project [array_prepend(array(1, 2, 3), 4) AS array_prepend(array(1, 2, 3), 4)#x]
+- OneRowRelation


-- !query
select array_prepend(array('a', 'b', 'c'), 'd')
-- !query analysis
Project [array_prepend(array(a, b, c), d) AS array_prepend(array(a, b, c), d)#x]
+- OneRowRelation


-- !query
select array_prepend(array(1, 2, 3, NULL), NULL)
-- !query analysis
Project [array_prepend(array(1, 2, 3, cast(null as int)), cast(null as int)) AS array_prepend(array(1, 2, 3, NULL), NULL)#x]
+- OneRowRelation


-- !query
select array_prepend(array('a', 'b', 'c', NULL), NULL)
-- !query analysis
Project [array_prepend(array(a, b, c, cast(null as string)), cast(null as string)) AS array_prepend(array(a, b, c, NULL), NULL)#x]
+- OneRowRelation


-- !query
select array_prepend(CAST(null AS ARRAY<String>), 'a')
-- !query analysis
Project [array_prepend(cast(null as array<string>), a) AS array_prepend(NULL, a)#x]
+- OneRowRelation


-- !query
select array_prepend(CAST(null AS ARRAY<String>), CAST(null as String))
-- !query analysis
Project [array_prepend(cast(null as array<string>), cast(null as string)) AS array_prepend(NULL, CAST(NULL AS STRING))#x]
+- OneRowRelation


-- !query
select array_prepend(array(), 1)
-- !query analysis
Project [array_prepend(cast(array() as array<int>), 1) AS array_prepend(array(), 1)#x]
+- OneRowRelation


-- !query
select array_prepend(CAST(array() AS ARRAY<String>), CAST(NULL AS String))
-- !query analysis
Project [array_prepend(cast(array() as array<string>), cast(null as string)) AS array_prepend(array(), CAST(NULL AS STRING))#x]
+- OneRowRelation


-- !query
select array_prepend(array(CAST(NULL AS String)), CAST(NULL AS String))
-- !query analysis
Project [array_prepend(array(cast(null as string)), cast(null as string)) AS array_prepend(array(CAST(NULL AS STRING)), CAST(NULL AS STRING))#x]
+- OneRowRelation
Original file line number Diff line number Diff line change
Expand Up @@ -657,3 +657,66 @@ select array_append(array(CAST(NULL AS String)), CAST(NULL AS String))
-- !query analysis
Project [array_append(array(cast(null as string)), cast(null as string)) AS array_append(array(CAST(NULL AS STRING)), CAST(NULL AS STRING))#x]
+- OneRowRelation


-- !query
select array_prepend(array(1, 2, 3), 4)
-- !query analysis
Project [array_prepend(array(1, 2, 3), 4) AS array_prepend(array(1, 2, 3), 4)#x]
+- OneRowRelation


-- !query
select array_prepend(array('a', 'b', 'c'), 'd')
-- !query analysis
Project [array_prepend(array(a, b, c), d) AS array_prepend(array(a, b, c), d)#x]
+- OneRowRelation


-- !query
select array_prepend(array(1, 2, 3, NULL), NULL)
-- !query analysis
Project [array_prepend(array(1, 2, 3, cast(null as int)), cast(null as int)) AS array_prepend(array(1, 2, 3, NULL), NULL)#x]
+- OneRowRelation


-- !query
select array_prepend(array('a', 'b', 'c', NULL), NULL)
-- !query analysis
Project [array_prepend(array(a, b, c, cast(null as string)), cast(null as string)) AS array_prepend(array(a, b, c, NULL), NULL)#x]
+- OneRowRelation


-- !query
select array_prepend(CAST(null AS ARRAY<String>), 'a')
-- !query analysis
Project [array_prepend(cast(null as array<string>), a) AS array_prepend(NULL, a)#x]
+- OneRowRelation


-- !query
select array_prepend(CAST(null AS ARRAY<String>), CAST(null as String))
-- !query analysis
Project [array_prepend(cast(null as array<string>), cast(null as string)) AS array_prepend(NULL, CAST(NULL AS STRING))#x]
+- OneRowRelation


-- !query
select array_prepend(array(), 1)
-- !query analysis
Project [array_prepend(cast(array() as array<int>), 1) AS array_prepend(array(), 1)#x]
+- OneRowRelation


-- !query
select array_prepend(CAST(array() AS ARRAY<String>), CAST(NULL AS String))
-- !query analysis
Project [array_prepend(cast(array() as array<string>), cast(null as string)) AS array_prepend(array(), CAST(NULL AS STRING))#x]
+- OneRowRelation


-- !query
select array_prepend(array(CAST(NULL AS String)), CAST(NULL AS String))
-- !query analysis
Project [array_prepend(array(cast(null as string)), cast(null as string)) AS array_prepend(array(CAST(NULL AS STRING)), CAST(NULL AS STRING))#x]
+- OneRowRelation

0 comments on commit 04333bb

Please sign in to comment.