Repository: spark
Updated Branches:
  refs/heads/master 583d91a19 -> 780c7224a


[MINOR][SQL] Fix minor formatting issue of SortAggregateExec.toString

## What changes were proposed in this pull request?

This PR fixes a minor formatting issue (missing space after comma) of 
`SorgAggregateExec.toString`.

Before:

```
SortAggregate(key=[a#76,b#77], functions=[max(c#78),min(c#78)], 
output=[a#76,b#77,max(c)#89,min(c)#90])
+- *Sort [a#76 ASC, b#77 ASC], false, 0
   +- Exchange hashpartitioning(a#76, b#77, 200)
      +- SortAggregate(key=[a#76,b#77], 
functions=[partial_max(c#78),partial_min(c#78)], 
output=[a#76,b#77,max#99,min#100])
         +- *Sort [a#76 ASC, b#77 ASC], false, 0
            +- LocalTableScan <empty>, [a#76, b#77, c#78]
```

After:

```
SortAggregate(key=[a#76, b#77], functions=[max(c#78), min(c#78)], output=[a#76, 
b#77, max(c)#89, min(c)#90])
+- *Sort [a#76 ASC, b#77 ASC], false, 0
   +- Exchange hashpartitioning(a#76, b#77, 200)
      +- SortAggregate(key=[a#76, b#77], functions=[partial_max(c#78), 
partial_min(c#78)], output=[a#76, b#77, max#99, min#100])
         +- *Sort [a#76 ASC, b#77 ASC], false, 0
            +- LocalTableScan <empty>, [a#76, b#77, c#78]
```

## How was this patch tested?

Manually tested.

Author: Cheng Lian <l...@databricks.com>

Closes #14480 from liancheng/fix-sort-based-agg-string-format.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/780c7224
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/780c7224
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/780c7224

Branch: refs/heads/master
Commit: 780c7224a5b8dd3bf7838c6f280c61daeef1dcbc
Parents: 583d91a
Author: Cheng Lian <l...@databricks.com>
Authored: Thu Aug 4 13:32:43 2016 +0800
Committer: Cheng Lian <l...@databricks.com>
Committed: Thu Aug 4 13:32:43 2016 +0800

----------------------------------------------------------------------
 .../spark/sql/execution/aggregate/SortAggregateExec.scala      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/780c7224/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala
index 05dbacf..00e4525 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala
@@ -111,9 +111,9 @@ case class SortAggregateExec(
   private def toString(verbose: Boolean): String = {
     val allAggregateExpressions = aggregateExpressions
 
-    val keyString = Utils.truncatedString(groupingExpressions, "[", ",", "]")
-    val functionString = Utils.truncatedString(allAggregateExpressions, "[", 
",", "]")
-    val outputString = Utils.truncatedString(output, "[", ",", "]")
+    val keyString = Utils.truncatedString(groupingExpressions, "[", ", ", "]")
+    val functionString = Utils.truncatedString(allAggregateExpressions, "[", 
", ", "]")
+    val outputString = Utils.truncatedString(output, "[", ", ", "]")
     if (verbose) {
       s"SortAggregate(key=$keyString, functions=$functionString, 
output=$outputString)"
     } else {


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

Reply via email to