You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2018/09/06 04:37:00 UTC

[jira] [Assigned] (SPARK-25252) Support arrays of any types in to_json

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

Hyukjin Kwon reassigned SPARK-25252:
------------------------------------

    Assignee: Maxim Gekk

> Support arrays of any types in to_json
> --------------------------------------
>
>                 Key: SPARK-25252
>                 URL: https://issues.apache.org/jira/browse/SPARK-25252
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Minor
>
> Need to improve the to_json function and make it more consistent with from_json by supporting arrays of any types (as root types). For now, it supports only arrays of structs and arrays of maps.  After the changes the following code should work:
> {code:scala}
> select to_json(array('1','2','3'))
> > ["1","2","3"]
> select to_json(array(array(1,2,3),array(4)))
> > [[1,2,3],[4]]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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