Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14927#discussion_r77260990
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala
---
@@ -448,7 +448,7 @@ private[execution] final class LongToUnsafeRowMap(val
mm: TaskMemoryManager, cap
private def nextSlot(pos: Int): Int = (pos + 2) & mask
private def getRow(address: Long, resultRow: UnsafeRow): UnsafeRow = {
- val offset = address >>> SIZE_BITS
+ val offset = (address >>> SIZE_BITS) + Platform.LONG_ARRAY_OFFSET
--- End diff --
This may sound a bit redundant. How creating two methods:
```scala
private[this] def toOffset(address: Long): Long = (address >>> SIZE_BITS) +
Platform.LONG_ARRAY_OFFSET
private[this] def toAdress(offset: Long): Long = (offset -
Platform.LONG_ARRAY_OFFSET) << SIZE_BITS
```
To make it clearer what you are doing there. They should be inlined, so the
performance overhead is minimal.
---
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]