Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/20174#discussion_r160040214
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
---
@@ -245,11 +252,15 @@ case class HashAggregateExec(
| $doAggFuncName();
| $aggTime.add((System.nanoTime() - $beforeAgg) / 1000000);
|
- | // output the result
- | ${genResult.trim}
+ | if (!$hasInput && ${resultVars.isEmpty}) {
--- End diff --
We only need this check only if `resultExpressions` is empty. So, I think
we can drop this check if non-empty (and regular) cases.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]