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

    https://github.com/apache/spark/pull/7849#discussion_r36036208
  
    --- Diff: 
sql/core/src/main/java/org/apache/spark/sql/execution/UnsafeFixedWidthAggregationMap.java
 ---
    @@ -225,4 +232,93 @@ public void printPerfMetrics() {
         System.out.println("Total memory consumption (bytes): " + 
map.getTotalMemoryConsumption());
       }
     
    +  /**
    +   * Sorts the key, value data in this map in place, and return them as an 
iterator.
    +   *
    +   * The only memory that is allocated is the address/prefix array, 16 
bytes per record.
    +   */
    +  public KVIterator<UnsafeRow, UnsafeRow> sortedIterator() {
    +    int numElements = map.numElements();
    +    final int numKeyFields = groupingKeySchema.size();
    +    TaskMemoryManager memoryManager = map.getTaskMemoryManager();
    --- End diff --
    
    can you name this `taskMemoryManager` to disambiguate from 
`ShuffleMemoryManager`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to