Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/7680#discussion_r35503799
--- Diff:
sql/catalyst/src/main/java/org/apache/spark/sql/execution/UnsafeExternalRowSorter.java
---
@@ -141,10 +141,13 @@ public InternalRow next() {
numFields,
sortedIterator.getRecordLength());
if (!hasNext()) {
- row.copy(); // so that we don't have dangling pointers to
freed page
+ UnsafeRow copy = row.copy(); // so that we don't have
dangling pointers to freed page
+ row.pointTo(null, 0, 0, 0); // so that we don't keep
references to the base object
--- End diff --
why not just
row = null ?
---
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]