Skip to content

Commit

Permalink
do not change existing code
Browse files Browse the repository at this point in the history
  • Loading branch information
liutang123 committed Jul 24, 2018
1 parent f67ff4d commit 06a9547
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,9 @@ private[execution] final class LongToUnsafeRowMap(val mm: TaskMemoryManager, cap

writeLong(array.length)
writeLongArray(writeBuffer, array, array.length)

val usedWordsNumber = ((cursor - Platform.LONG_ARRAY_OFFSET) / 8).toInt
writeLong(usedWordsNumber)
writeLongArray(writeBuffer, page, usedWordsNumber)
val used = ((cursor - Platform.LONG_ARRAY_OFFSET) / 8).toInt
writeLong(used)
writeLongArray(writeBuffer, page, used)
}

override def writeExternal(output: ObjectOutput): Unit = {
Expand Down Expand Up @@ -771,10 +770,10 @@ private[execution] final class LongToUnsafeRowMap(val mm: TaskMemoryManager, cap
val length = readLong().toInt
mask = length - 2
array = readLongArray(readBuffer, length)
val usedWordsNumber = readLong().toInt
val pageLength = readLong().toInt
page = readLongArray(readBuffer, pageLength)
// Set cursor because cursor is used in write function.
cursor = usedWordsNumber * 8 + Platform.LONG_ARRAY_OFFSET
page = readLongArray(readBuffer, usedWordsNumber)
cursor = pageLength * 8 + Platform.LONG_ARRAY_OFFSET
}

override def readExternal(in: ObjectInput): Unit = {
Expand Down

0 comments on commit 06a9547

Please sign in to comment.