myegorov commented on code in PR #44631:
URL: https://github.com/apache/arrow/pull/44631#discussion_r1827151896
##########
java/vector/src/main/java/org/apache/arrow/vector/NullVector.java:
##########
@@ -155,9 +155,16 @@ public boolean allocateNewSafe() {
@Override
public void reAlloc() {}
+ /*
+ * IMPORTANT NOTE
+ * It's essential that NullVector (and ZeroVector) do not require
BufferAllocator for any data storage.
+ * However, some methods of the parent interface may require passing in a
BufferAllocator, even if null.
+ *
+ * @return null
+ */
@Override
public BufferAllocator getAllocator() {
- throw new UnsupportedOperationException("Tried to get allocator from
NullVector");
+ return null;
Review Comment:
I haven't added a test to check this returns `null` because this seems to me
an implementation detail. Please let me know if you think otherwise.
--
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]