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

Reynold Xin resolved SPARK-8907.
--------------------------------
       Resolution: Fixed
         Assignee: Cheng Lian
    Fix Version/s: 1.5.0

> Speed up path construction in 
> DynamicPartitionWriterContainer.outputWriterForRow
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-8907
>                 URL: https://issues.apache.org/jira/browse/SPARK-8907
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Reynold Xin
>            Assignee: Cheng Lian
>             Fix For: 1.5.0
>
>
> Don't use zip and scala collection methods to avoid garbage collection
> {code}
>     val partitionPath = partitionColumns.zip(row.toSeq).map { case (col, 
> rawValue) =>
>       val string = if (rawValue == null) null else String.valueOf(rawValue)
>       val valueString = if (string == null || string.isEmpty) {
>         defaultPartitionName
>       } else {
>         PartitioningUtils.escapePathName(string)
>       }
>       s"/$col=$valueString"
>     }.mkString.stripPrefix(Path.SEPARATOR)
> {code}
> We can probably use catalyst expressions themselves to construct the path, 
> and then we can leverage code generation to do this.



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