Skip to content

Commit 7a89f2a

Browse files
lianchengAndrew Or
authored andcommitted
[SQL] Minor HashAggregateExec string output fixes
## What changes were proposed in this pull request? This PR fixes some minor `.toString` format issues for `HashAggregateExec`. Before: ``` *HashAggregate(key=[a#234L,b#235L], functions=[count(1),max(c#236L)], output=[a#234L,b#235L,count(c)#247L,max(c)#248L]) ``` After: ``` *HashAggregate(keys=[a#234L, b#235L], functions=[count(1), max(c#236L)], output=[a#234L, b#235L, count(c)#247L, max(c)#248L]) ``` ## How was this patch tested? Manually tested. Author: Cheng Lian <lian@databricks.com> Closes apache#13710 from liancheng/minor-agg-string-fix.
1 parent acef843 commit 7a89f2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -774,13 +774,13 @@ case class HashAggregateExec(
774774

775775
testFallbackStartsAt match {
776776
case None =>
777-
val keyString = Utils.truncatedString(groupingExpressions, "[", ",", "]")
778-
val functionString = Utils.truncatedString(allAggregateExpressions, "[", ",", "]")
779-
val outputString = Utils.truncatedString(output, "[", ",", "]")
777+
val keyString = Utils.truncatedString(groupingExpressions, "[", ", ", "]")
778+
val functionString = Utils.truncatedString(allAggregateExpressions, "[", ", ", "]")
779+
val outputString = Utils.truncatedString(output, "[", ", ", "]")
780780
if (verbose) {
781-
s"HashAggregate(key=$keyString, functions=$functionString, output=$outputString)"
781+
s"HashAggregate(keys=$keyString, functions=$functionString, output=$outputString)"
782782
} else {
783-
s"HashAggregate(key=$keyString, functions=$functionString)"
783+
s"HashAggregate(keys=$keyString, functions=$functionString)"
784784
}
785785
case Some(fallbackStartsAt) =>
786786
s"HashAggregateWithControlledFallback $groupingExpressions " +

0 commit comments

Comments
 (0)