spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-27607) Improve performance of Row.toString()
Date Thu, 02 May 2019 14:22:00 GMT

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

Dongjoon Hyun resolved SPARK-27607.
-----------------------------------
       Resolution: Fixed
         Assignee: Marco Gaido
    Fix Version/s: 3.0.0

This is resolved via https://github.com/apache/spark/pull/24505

> Improve performance of Row.toString()
> -------------------------------------
>
>                 Key: SPARK-27607
>                 URL: https://issues.apache.org/jira/browse/SPARK-27607
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Josh Rosen
>            Assignee: Marco Gaido
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> I have a job which ends up calling {{org.apache.spark.sql.Row.toString}} on every row
in a massive dataset (the reasons for this are slightly odd and it's a bit non-trivial to
change the job to avoid this step). 
> {{Row.toString}} is implemented by first constructing a WrappedArray containing the Row's
values (by calling {{toSeq}}) and then turning that array into a string with {{mkString}}.
We might be able to get a small performance win by pipelining these steps, using an imperative
loop to append fields to a StringBuilder as soon as they're retrieved (thereby cutting out
a few layers of Scala collections indirection).



--
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


Mime
View raw message