Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22630#discussion_r223023197
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -705,13 +712,16 @@ case class HashAggregateExec(
     
         def outputFromRegularHashMap: String = {
           s"""
    -         |while ($iterTerm.next()) {
    +         |while ($iterTerm.next()$limitNotReachedCond) {
              |  UnsafeRow $keyTerm = (UnsafeRow) $iterTerm.getKey();
              |  UnsafeRow $bufferTerm = (UnsafeRow) $iterTerm.getValue();
              |  $outputFunc($keyTerm, $bufferTerm);
    -         |
              |  if (shouldStop()) return;
              |}
    +         |$iterTerm.close();
    --- End diff --
    
    Yes it's unrelated and is a noop. `outputFromRowBasedMap` and 
`outputFromVectorizedMap` put the resource closing at the end, I want to be 
consistent here.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to