aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Lian <lian@databricks.com>2016-08-04 13:32:43 +0800
committerCheng Lian <lian@databricks.com>2016-08-04 13:32:43 +0800
commit780c7224a5b8dd3bf7838c6f280c61daeef1dcbc (patch)
tree4633ba20dea480b3f95f884ea246843b7597b158
parent583d91a1957f4258a64184cc6b9007588791d332 (diff)
downloadspark-780c7224a5b8dd3bf7838c6f280c61daeef1dcbc.tar.gz
spark-780c7224a5b8dd3bf7838c6f280c61daeef1dcbc.tar.bz2
spark-780c7224a5b8dd3bf7838c6f280c61daeef1dcbc.zip
[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 <lian@databricks.com> Closes #14480 from liancheng/fix-sort-based-agg-string-format.
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala6
1 files changed, 3 insertions, 3 deletions
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 05dbacf07a..00e45256c4 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 {