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 2015/11/19 02:57:11 UTC

[jira] [Commented] (SPARK-11840) Restore the 1.5's behavior of planning a single distinct aggregation.

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

Apache Spark commented on SPARK-11840:
--------------------------------------

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

> Restore the 1.5's behavior of planning a single distinct aggregation.
> ---------------------------------------------------------------------
>
>                 Key: SPARK-11840
>                 URL: https://issues.apache.org/jira/browse/SPARK-11840
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Yin Huai
>            Assignee: Yin Huai
>
> The impact of this change is for a query that has a single distinct column and does not have any grouping expression like
> {{SELECT COUNT(DISTINCT a) FROM table}}
> The plan will be changed from
> {code}
> AGG-2 (count distinct)
>   Shuffle to a single reducer
>     Partial-AGG-2 (count distinct)
>       AGG-1 (grouping on a)
>         Shuffle by a
>           Partial-AGG-1 (grouping on 1)
> {code}
> to the following one (1.5 uses this)
> {code}
> AGG-2
>   AGG-1 (grouping on a)
>     Shuffle to a single reducer
>       Partial-AGG-1(grouping on a)
> {code}
> The first plan is more robust. However, to better benchmark the impact of this change, we should use 1.5's plan and use the conf of {{spark.sql.specializeSingleDistinctAggPlanning}} to control the plan.



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