Github user eyalfa commented on a diff in the pull request:
https://github.com/apache/spark/pull/19181#discussion_r138373142
--- Diff:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
---
@@ -170,6 +170,10 @@ public void free() {
public void reset() {
if (consumer != null) {
consumer.freeArray(array);
+ array = LongArray.empty;
--- End diff --
@hvanhovell ,
I'm starting to have second thoughts about the special `empty` instance
here, I'm afraid the the nested call might trigger `freeArray` or something
similar on it.
perhaps using null is a better option here?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]