Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/19181#discussion_r138733992
--- Diff:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
---
@@ -162,14 +162,20 @@ private int getUsableCapacity() {
*/
public void free() {
if (consumer != null) {
- consumer.freeArray(array);
+ if (null != array) {
+ consumer.freeArray(array);
+ }
array = null;
}
}
public void reset() {
if (consumer != null) {
consumer.freeArray(array);
+ array = null;
--- End diff --
Please document why this is needed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]