Thiago Rodrigues Baldim created SPARK-22556:
-----------------------------------------------
Summary: WrappedArray with Explode Function create WrappedArray
with 1 object.
Key: SPARK-22556
URL: https://issues.apache.org/jira/browse/SPARK-22556
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 2.2.0
Environment: N/A
Reporter: Thiago Rodrigues Baldim
With org.apache.spark.sql.functions.explode function based in the result of an
org.apache.spark.sql.functions.array the output result is not Objects inside
of the object result.
The result is an WrappedArray of one only one object and not the object itself.
If we setup an scala.Array we got the result, that doesn't happens with the
WrappedArray.
myDf.withColumn("exploded_field", explode(array(my_arr_func('col_1),
my_arr_func('col_2)))).take(10).foreach(println)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]