Skip to content

Commit 780c722

Browse files
committed
[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)alteryx#89,min(c)alteryx#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)alteryx#89, min(c)alteryx#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 <[email protected]> Closes apache#14480 from liancheng/fix-sort-based-agg-string-format.
1 parent 583d91a commit 780c722

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/SortAggregateExec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ case class SortAggregateExec(
111111
private def toString(verbose: Boolean): String = {
112112
val allAggregateExpressions = aggregateExpressions
113113

114-
val keyString = Utils.truncatedString(groupingExpressions, "[", ",", "]")
115-
val functionString = Utils.truncatedString(allAggregateExpressions, "[", ",", "]")
116-
val outputString = Utils.truncatedString(output, "[", ",", "]")
114+
val keyString = Utils.truncatedString(groupingExpressions, "[", ", ", "]")
115+
val functionString = Utils.truncatedString(allAggregateExpressions, "[", ", ", "]")
116+
val outputString = Utils.truncatedString(output, "[", ", ", "]")
117117
if (verbose) {
118118
s"SortAggregate(key=$keyString, functions=$functionString, output=$outputString)"
119119
} else {

0 commit comments

Comments
 (0)