Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Inline writeNull().
  • Loading branch information
ueshin committed Jul 27, 2017
commit b85dc231d05f5e1a1a3d8b0bcbc778b85d83c533
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private[arrow] abstract class ArrowFieldWriter {
def setNull(): Unit
def setValue(input: SpecializedGetters, ordinal: Int): Unit

protected var count: Int = 0
private[arrow] var count: Int = 0

def write(input: SpecializedGetters, ordinal: Int): Unit = {
if (input.isNullAt(ordinal)) {
Expand All @@ -123,11 +123,6 @@ private[arrow] abstract class ArrowFieldWriter {
count += 1
}

def writeNull(): Unit = {
setNull()
count += 1
}

def finish(): Unit = {
valueMutator.setValueCount(count)
}
Expand Down Expand Up @@ -299,7 +294,8 @@ private[arrow] class StructWriter(
override def setNull(): Unit = {
var i = 0
while (i < children.length) {
children(i).writeNull()
children(i).setNull()
children(i).count += 1
i += 1
}
valueMutator.setNull(count)
Expand Down