pitrou commented on code in PR #14244:
URL: https://github.com/apache/arrow/pull/14244#discussion_r980964063
##########
java/vector/src/main/java/org/apache/arrow/vector/FieldVector.java:
##########
@@ -90,4 +90,11 @@ public interface FieldVector extends ValueVector {
* @return buffer address
*/
long getOffsetBufferAddress();
+
+ /**
+ * Sets the value at index to null.
Review Comment:
Seems like other docstrings use the infinitive:
```suggestion
* Set the element at the given index to null.
```
##########
java/vector/src/main/codegen/templates/UnionVector.java:
##########
@@ -851,4 +851,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
Review Comment:
```suggestion
* Set the element at the given index to null. For UnionVector, it is a
no-op as nulls are not supported at the
```
##########
java/vector/src/main/codegen/templates/UnionVector.java:
##########
@@ -851,4 +851,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.
+ *
+ * @param index position of element
+ */
+ @Override
+ public void setNull(int index) {}
Review Comment:
Same here: should this raise an error?
##########
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:
Hmm, should this raise an error then, instead of silently ignoring the
request?
--
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]