Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/9383#discussion_r43951003
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/UnsafeFixedWidthAggregationMap.java
---
@@ -243,9 +243,8 @@ public void printPerfMetrics() {
* Note that this destroys the map, and as a result, the map cannot be
used anymore after this.
*/
public UnsafeKVExternalSorter destructAndCreateExternalSorter() throws
IOException {
- UnsafeKVExternalSorter sorter = new UnsafeKVExternalSorter(
+ return new UnsafeKVExternalSorter(
groupingKeySchema, aggregationBufferSchema,
SparkEnv.get().blockManager(), map.getPageSizeBytes(), map);
--- End diff --
Also, I think we need to make it clear that `map` will not be freed at here.
---
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]