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 2016/06/03 00:07:59 UTC
[jira] [Assigned] (SPARK-15742) Reduce collections allocations in
Catalyst tree transformation methods
[ https://issues.apache.org/jira/browse/SPARK-15742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-15742:
------------------------------------
Assignee: Josh Rosen (was: Apache Spark)
> Reduce collections allocations in Catalyst tree transformation methods
> ----------------------------------------------------------------------
>
> Key: SPARK-15742
> URL: https://issues.apache.org/jira/browse/SPARK-15742
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Reporter: Josh Rosen
> Assignee: Josh Rosen
>
> In Catalyst's TreeNode {{transform}} methods we end up calling {{productIterator.map(...).toArray()}} in a number of places, which is slightly inefficient because it needs to allocate and grow ArrayBuilders. Since we already know the size of the final output ({{productArity}}), we can simply allocate an array up-front and use a while loop to consume the iterator and populate the array.
> For most workloads, this performance difference is negligible but it does make a measurable difference in optimizer performance for queries that operate over very wide schemas (thousands of columns).
--
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