Description
For the below query:
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
The latest spark gives the below schema, the field name "my_array" was changed to "0"
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)
While Spark 3.1 gives the expected result
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)