Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20174#discussion_r160126732
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -230,6 +236,7 @@ case class HashAggregateExec(
              | private void $doAgg() throws java.io.IOException {
              |   // initialize aggregation buffer
              |   $initBufVar
    +         |   $hasInput = false;
    --- End diff --
    
    How about using a returned value of `doAgg` to check `hasInput`? I feel 
it's better to avoid mutable states as much as possible.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to