Skip to content

Commit 06a9547

Browse files
committed
do not change existing code
1 parent f67ff4d commit 06a9547

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,9 @@ private[execution] final class LongToUnsafeRowMap(val mm: TaskMemoryManager, cap
726726

727727
writeLong(array.length)
728728
writeLongArray(writeBuffer, array, array.length)
729-
730-
val usedWordsNumber = ((cursor - Platform.LONG_ARRAY_OFFSET) / 8).toInt
731-
writeLong(usedWordsNumber)
732-
writeLongArray(writeBuffer, page, usedWordsNumber)
729+
val used = ((cursor - Platform.LONG_ARRAY_OFFSET) / 8).toInt
730+
writeLong(used)
731+
writeLongArray(writeBuffer, page, used)
733732
}
734733

735734
override def writeExternal(output: ObjectOutput): Unit = {
@@ -771,10 +770,10 @@ private[execution] final class LongToUnsafeRowMap(val mm: TaskMemoryManager, cap
771770
val length = readLong().toInt
772771
mask = length - 2
773772
array = readLongArray(readBuffer, length)
774-
val usedWordsNumber = readLong().toInt
773+
val pageLength = readLong().toInt
774+
page = readLongArray(readBuffer, pageLength)
775775
// Set cursor because cursor is used in write function.
776-
cursor = usedWordsNumber * 8 + Platform.LONG_ARRAY_OFFSET
777-
page = readLongArray(readBuffer, usedWordsNumber)
776+
cursor = pageLength * 8 + Platform.LONG_ARRAY_OFFSET
778777
}
779778

780779
override def readExternal(in: ObjectInput): Unit = {

0 commit comments

Comments
 (0)