Skip to content

Commit 881e0ea

Browse files
committed
Discard the setZero results explicitly for the strict Scala profile
1 parent fb76ab2 commit 881e0ea

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎spark/src/main/scala/org/apache/spark/sql/comet/execution/arrow/ArrowWriters.scala‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ private[arrow] object ArrowWriter {
132132
vector.setValueCount(0)
133133
}
134134

135-
private def zero(buffer: ArrowBuf): Unit = buffer.setZero(0, buffer.capacity)
135+
private def zero(buffer: ArrowBuf): Unit = {
136+
val _ = buffer.setZero(0, buffer.capacity)
137+
}
136138

137139
/**
138140
* Gives `vector` new buffers for `capacity` values. Arrow's `allocateNew` zeroes the values as
@@ -396,7 +398,8 @@ private[arrow] object ArrowFieldWriter {
396398
case 16 =>
397399
Platform.putLong(null, address, 0L)
398400
Platform.putLong(null, address + 8, 0L)
399-
case _ => vector.getDataBuffer.setZero(index.toLong * width, width.toLong)
401+
case _ =>
402+
val _ = vector.getDataBuffer.setZero(index.toLong * width, width.toLong)
400403
}
401404
}
402405

0 commit comments

Comments
 (0)