[ 
https://issues.apache.org/jira/browse/SPARK-10705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14902342#comment-14902342
 ] 

Apache Spark commented on SPARK-10705:
--------------------------------------

User 'viirya' has created a pull request for this issue:
https://github.com/apache/spark/pull/8865

> Stop converting internal rows to external rows in DataFrame.toJSON
> ------------------------------------------------------------------
>
>                 Key: SPARK-10705
>                 URL: https://issues.apache.org/jira/browse/SPARK-10705
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.3.1, 1.4.1, 1.5.0
>            Reporter: Cheng Lian
>
> {{DataFrame.toJSON}} uses {{DataFrame.mapPartitions}}, which converts 
> internal rows to external rows. We can use 
> {{queryExecution.toRdd.mapPartitions}} instead for better performance.
> Another issue is that, for UDT values, {{serialize}} produces internal types. 
> So currently we must deal with both internal and external types within 
> {{toJSON}} (see 
> [here|https://github.com/apache/spark/pull/8806/files#diff-0f04c36e499d4dcf6931fbd62b3aa012R77]),
>  which is pretty weird.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to