You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/09/05 06:36:26 UTC

[jira] [Commented] (SPARK-3409) Avoid pulling in Exchange operator itself in Exchange's closures

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

Apache Spark commented on SPARK-3409:
-------------------------------------

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

> Avoid pulling in Exchange operator itself in Exchange's closures
> ----------------------------------------------------------------
>
>                 Key: SPARK-3409
>                 URL: https://issues.apache.org/jira/browse/SPARK-3409
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Reynold Xin
>            Assignee: Reynold Xin
>
> {code}
>         val rdd = child.execute().mapPartitions { iter =>
>           if (sortBasedShuffleOn) {
>             iter.map(r => (null, r.copy()))
>           } else {
>             val mutablePair = new MutablePair[Null, Row]()
>             iter.map(r => mutablePair.update(null, r))
>           }
>         }
> {code}
> The above snippet from Exchange references sortBasedShuffleOn within a closure, which requires pulling in the entire Exchange object in the closure. 
> This is a tiny teeny optimization.



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

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