spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-14830) Add RemoveRepetitionFromGroupExpressions optimizer
Date Fri, 22 Apr 2016 00:12:12 GMT

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

Apache Spark commented on SPARK-14830:
--------------------------------------

User 'dongjoon-hyun' has created a pull request for this issue:
https://github.com/apache/spark/pull/12590

> Add RemoveRepetitionFromGroupExpressions optimizer
> --------------------------------------------------
>
>                 Key: SPARK-14830
>                 URL: https://issues.apache.org/jira/browse/SPARK-14830
>             Project: Spark
>          Issue Type: Improvement
>          Components: Optimizer
>            Reporter: Dongjoon Hyun
>
> This issue aims to optimize GroupExpressions by removing repeating expressions. 
> **Before**
> {code}
> scala> sql("select a from (select explode(array(1,2)) a) T group by a, a, a").explain()
> == Physical Plan ==
> WholeStageCodegen
> :  +- TungstenAggregate(key=[a#5,a#5,a#5], functions=[], output=[a#5])
> :     +- INPUT
> +- Exchange hashpartitioning(a#5, a#5, a#5, 200), None
>    +- WholeStageCodegen
>       :  +- TungstenAggregate(key=[a#5,a#5,a#5], functions=[], output=[a#5,a#5,a#5])
>       :     +- INPUT
>       +- Generate explode([1,2]), false, false, [a#5]
>          +- Scan OneRowRelation[]
> {code}
> **After**
> {code}
> scala> sql("select a from (select explode(array(1,2)) a) T group by a, a, a").explain()
> == Physical Plan ==
> WholeStageCodegen
> :  +- TungstenAggregate(key=[a#5], functions=[], output=[a#5])
> :     +- INPUT
> +- Exchange hashpartitioning(a#5, 200), None
>    +- WholeStageCodegen
>       :  +- TungstenAggregate(key=[a#5], functions=[], output=[a#5])
>       :     +- INPUT
>       +- Generate explode([1,2]), false, false, [a#5]
>          +- Scan OneRowRelation[]
> {code}



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


Mime
View raw message