andygrove commented on code in PR #892:
URL: https://github.com/apache/datafusion-comet/pull/892#discussion_r1737907814
##########
common/src/main/scala/org/apache/spark/sql/comet/execution/arrow/ArrowWriters.scala:
##########
@@ -137,6 +150,28 @@ private[arrow] abstract class ArrowFieldWriter {
count += 1
}
+ def writeCol(input: ColumnarArray): Unit = {
+ val inputNumElements = input.numElements()
+ valueVector.setInitialCapacity(inputNumElements)
+ while (count < inputNumElements) {
+ if (input.isNullAt(count)) {
+ setNull()
+ } else {
+ setValue(input, count)
+ }
Review Comment:
This comment isn't related to any changes in this PR, but I was a little
surprised at our current api where we call `setNull()` with no arguments and it
knows to set null at the current index, but when we call `setValue` we pass the
index. It just seems inconsistent. We can maybe revisit this design in the
future.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]