Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ class ArrowWriter(val root: VectorSchemaRoot, fields: Array[ArrowFieldWriter]) {
count += 1
}

def sizeInBytes(): Int = {
def sizeInBytes(): Long = {
var i = 0
var bytes = 0
var bytes = 0L
while (i < fields.size) {
bytes += fields(i).getSizeInBytes()
i += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ class SliceBytesArrowOutputProcessorImpl(
}
}

private def getBatchBytes(root: VectorSchemaRoot): Int = {
var batchBytes = 0
private def getBatchBytes(root: VectorSchemaRoot): Long = {
var batchBytes = 0L
root.getFieldVectors.asScala.foreach { vector =>
batchBytes += vector.getBufferSize
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class BaseStreamingArrowWriterSuite extends SparkFunSuite {
()
}

when(arrowWriter.sizeInBytes()).thenAnswer { _ => sizeCounter }
when(arrowWriter.sizeInBytes()).thenAnswer { _ => sizeCounter.toLong }

// Set arrowMaxBytesPerBatch to 1
transformWithStateInPySparkWriter = new BaseStreamingArrowWriter(
Expand Down