You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Thiago Rodrigues Baldim (JIRA)" <ji...@apache.org> on 2017/11/20 00:26:00 UTC

[jira] [Created] (SPARK-22556) WrappedArray with Explode Function create WrappedArray with 1 object.

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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org