spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "StanZhai (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-22084) Performance regression in aggregation strategy
Date Thu, 21 Sep 2017 05:39:00 GMT

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

StanZhai updated SPARK-22084:
-----------------------------
    Description: 
{code:sql}
SELECT a, SUM(b) AS b0, SUM(b) AS b1 
FROM VALUES(1, 1), (2, 2) AS (a, b) 
GROUP BY a
{code}

Two exactly the same SUM(b) expressions in the SQL, and the following is the physical plan
in Spark 2.x.

{code}
== Physical Plan ==
*HashAggregate(keys=[a#11], functions=[sum(cast(b#12 as bigint)), sum(cast(b#12 as bigint))])
+- Exchange hashpartitioning(a#11, 200)
   +- *HashAggregate(keys=[a#11], functions=[partial_sum(cast(b#12 as bigint)), partial_sum(cast(b#12
as bigint))])
      +- LocalTableScan [a#11, b#12]
{code}

functions in Aggregate should be: functions=[partial_sum(cast(b#12 as bigint))]

  was:
{code:sql}
SELECT a, SUM(b) AS b0, SUM(b) AS b1 
FROM VALUES(1, 1), (2, 2) AS (a, b) 
GROUP BY a
{code}

Two exactly the same SUM(b) expressions in the SQL, and the following is the physical plan
in Spark 2.x.

== Physical Plan ==
*HashAggregate(keys=[a#11], functions=[sum(cast(b#12 as bigint)), sum(cast(b#12 as bigint))])
+- Exchange hashpartitioning(a#11, 200)
   +- *HashAggregate(keys=[a#11], functions=[partial_sum(cast(b#12 as bigint)), partial_sum(cast(b#12
as bigint))])
      +- LocalTableScan [a#11, b#12]

functions in Aggregate should be: functions=[partial_sum(cast(b#12 as bigint))]


> Performance regression in aggregation strategy
> ----------------------------------------------
>
>                 Key: SPARK-22084
>                 URL: https://issues.apache.org/jira/browse/SPARK-22084
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1, 2.2.0
>            Reporter: StanZhai
>
> {code:sql}
> SELECT a, SUM(b) AS b0, SUM(b) AS b1 
> FROM VALUES(1, 1), (2, 2) AS (a, b) 
> GROUP BY a
> {code}
> Two exactly the same SUM(b) expressions in the SQL, and the following is the physical
plan in Spark 2.x.
> {code}
> == Physical Plan ==
> *HashAggregate(keys=[a#11], functions=[sum(cast(b#12 as bigint)), sum(cast(b#12 as bigint))])
> +- Exchange hashpartitioning(a#11, 200)
>    +- *HashAggregate(keys=[a#11], functions=[partial_sum(cast(b#12 as bigint)), partial_sum(cast(b#12
as bigint))])
>       +- LocalTableScan [a#11, b#12]
> {code}
> functions in Aggregate should be: functions=[partial_sum(cast(b#12 as bigint))]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message