Skip to content
Snippets Groups Projects
Commit 7a89f2ad authored by Cheng Lian's avatar Cheng Lian Committed by Andrew Or
Browse files

[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 #13710 from liancheng/minor-agg-string-fix.
parent acef843f
No related branches found
No related tags found
No related merge requests found
......@@ -774,13 +774,13 @@ case class HashAggregateExec(
testFallbackStartsAt match {
case None =>
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"HashAggregate(key=$keyString, functions=$functionString, output=$outputString)"
s"HashAggregate(keys=$keyString, functions=$functionString, output=$outputString)"
} else {
s"HashAggregate(key=$keyString, functions=$functionString)"
s"HashAggregate(keys=$keyString, functions=$functionString)"
}
case Some(fallbackStartsAt) =>
s"HashAggregateWithControlledFallback $groupingExpressions " +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment