lwhite1 commented on code in PR #14244:
URL: https://github.com/apache/arrow/pull/14244#discussion_r983559492
##########
java/vector/src/main/codegen/templates/DenseUnionVector.java:
##########
@@ -940,4 +940,13 @@ public void setInitialCapacity(int valueCount, double
density) {
}
}
}
+
+ /**
+ * Set the element at the given index to null. For DenseUnionVector, it is a
no-op as nulls are not supported at the
+ * top level, and isNull() always returns false. Nullability is only handled
at the level of individual child vectors.
Review Comment:
@lidavidm
> given this is a new method, I think an exception from the get-go is OK.
This _is_ a new method, but there is an existing, equivalent method in the
FieldWriters called `writeNull()` which is implemented as a no-op. I don't
think they can have different results. If this one throws an exception, that
one should as well, which would be a breaking change. Is that your
recommendation?
> Could it also delegate to a child?
I looked at delegating to a child vector, and, as with the above option, I
think it needs to be consistent with the FieldWriter. Also, I think to ensure
predictable results it would have to write null to _all_ the child vectors,
which I wasn't sure was completely practical.
--
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]