[GitHub] spark pull request #20375: [SPARK-23199][SQL]improved Removes repetition fro...

2018-01-29 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/20375


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20375: [SPARK-23199][SQL]improved Removes repetition fro...

2018-01-24 Thread mgaido91
Github user mgaido91 commented on a diff in the pull request:

https://github.com/apache/spark/pull/20375#discussion_r163547424
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
@@ -1303,8 +1303,12 @@ object RemoveLiteralFromGroupExpressions extends 
Rule[LogicalPlan] {
  */
 object RemoveRepetitionFromGroupExpressions extends Rule[LogicalPlan] {
   def apply(plan: LogicalPlan): LogicalPlan = plan transform {
-case a @ Aggregate(grouping, _, _) =>
+case a @ Aggregate(grouping, _, _) if grouping.nonEmpty =>
--- End diff --

this can be `grouping.length > 1`


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20375: [SPARK-23199][SQL]improved Removes repetition fro...

2018-01-23 Thread heary-cao
GitHub user heary-cao opened a pull request:

https://github.com/apache/spark/pull/20375

[SPARK-23199][SQL]improved Removes repetition from group expressions in 
Aggregate

## What changes were proposed in this pull request?

Currently, all Aggregate operations will go into 
RemoveRepetitionFromGroupExpressions, but there is no group expression or there 
is no duplicate group expression in group expression, we not need copy for 
logic plan.

## How was this patch tested?

the existed test case.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/heary-cao/spark RepetitionGroupExpressions

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/20375.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #20375


commit 804e5068f16753b7fd40c8edf75dbb756d76d571
Author: caoxuewen 
Date:   2018-01-24T03:00:48Z

improved Removes repetition from group expressions in Aggregate




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org