[ 
https://issues.apache.org/jira/browse/SPARK-40292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-40292:
------------------------------------

    Assignee: Apache Spark

> arrays_zip output unexpected alias column names
> -----------------------------------------------
>
>                 Key: SPARK-40292
>                 URL: https://issues.apache.org/jira/browse/SPARK-40292
>             Project: Spark
>          Issue Type: Task
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Linhong Liu
>            Assignee: Apache Spark
>            Priority: Major
>
> For the below query:
> {code:sql}
> with q as (
>   select
>     named_struct(
>       'my_array', array(named_struct('x', 1, 'y', 2))
>     ) as my_struct
> )
> select
>   arrays_zip(my_struct.my_array)
> from
>   q {code}
> The latest spark gives the below schema, the field name "my_array" was 
> changed to "0"
> {code:java}
> root
>  |-- arrays_zip(my_struct.my_array): array (nullable = true)
>  |    |-- element: struct (containsNull = false)
>  |    |    |-- 0: struct (nullable = true)
>  |    |    |    |-- x: integer (nullable = true)
>  |    |    |    |-- y: integer (nullable = true){code}
> While Spark 3.1 gives the expected result
> {code:java}
> root
>  |-- arrays_zip(my_struct.my_array): array (nullable = true)
>  |    |-- element: struct (containsNull = false)
>  |    |    |-- my_array: struct (nullable = true)
>  |    |    |    |-- x: integer (nullable = true)
>  |    |    |    |-- y: integer (nullable = true)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to