Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/13318#discussion_r64780973
--- Diff:
core/src/main/java/org/apache/spark/shuffle/sort/ShuffleInMemorySorter.java ---
@@ -101,14 +94,17 @@ public void expandPointerArray(LongArray newArray) {
array.getBaseOffset(),
newArray.getBaseObject(),
newArray.getBaseOffset(),
- array.size() * (8 / memoryAllocationFactor)
+ pos * 8
--- End diff --
In theory, memoryAllocationFactor should be 2 for radix sort and 1.5 for
tim sort. For simplicity, I'd like to trade a little bit memory efficiency for
simplicity. memoryAllocationFactor is only used in hasSpaceForAnotherRecord(),
if you feel strong on this tradeoff, I could update hasSpaceForAnotherRecord()
to use 1.5 for timsort.
For here, we don't need memoryAllocationFactor actually.
---
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]