Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19222#discussion_r177692709
--- Diff:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
---
@@ -348,10 +342,7 @@ public UnsafeSorterIterator getSortedIterator() {
array, nullBoundaryPos, (pos - nullBoundaryPos) / 2L, 0, 7,
radixSortSupport.sortDescending(),
radixSortSupport.sortSigned());
} else {
- MemoryBlock unused = new MemoryBlock(
- array.getBaseObject(),
- array.getBaseOffset() + pos * 8L,
- (array.size() - pos) * 8L);
+ MemoryBlock unused = array.memoryBlock().subBlock(pos *
8L,(array.size() - pos) * 8L);
--- End diff --
ditto
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]