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

    https://github.com/apache/spark/pull/19869#discussion_r154562413
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala
 ---
    @@ -672,48 +668,56 @@ case class HashAggregateExec(
     
         def outputFromRowBasedMap: String = {
           s"""
    -       while ($iterTermForFastHashMap.next()) {
    -         $numOutput.add(1);
    -         UnsafeRow $keyTerm = (UnsafeRow) $iterTermForFastHashMap.getKey();
    -         UnsafeRow $bufferTerm = (UnsafeRow) 
$iterTermForFastHashMap.getValue();
    -         $outputFunc($keyTerm, $bufferTerm);
    -
    -         if (shouldStop()) return;
    -       }
    -       $fastHashMapTerm.close();
    -     """
    +         |while ($iterTermForFastHashMap.next()) {
    --- End diff --
    
    super nit: can we also drop unnecessary spaces in the head from this file? 
e.g., 
    ```
          s"""
             | private void $doAgg() throws java.io.IOException {
    ```
    ```
          s"""
             |private void $doAgg() throws java.io.IOException {
    ```
    
https://github.com/cloud-fan/spark/blob/9b8ae3d6635c5ed0323bf088e20d0de55dd1c098/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala#L233


---

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

Reply via email to