liyafan82 commented on a change in pull request #8147:
URL: https://github.com/apache/arrow/pull/8147#discussion_r489995610
##########
File path: java/vector/src/main/java/org/apache/arrow/vector/IntVector.java
##########
@@ -164,7 +165,9 @@ private void setValue(int index, int value) {
* @param value value of element
*/
public void set(int index, int value) {
- BitVectorHelper.setBit(validityBuffer, index);
+ if (!NON_NULLABLE_VECTORS_ENABLED || nullable) {
Review comment:
@kiszk Thanks for your feedback. I have changed the code accordingly.
It really makes the code simpler, and I've verified that there were no
performance regression.
However, it could also lead to some consufing behavior. For example, a
vector that is known to have no null values may have `nullable` field equal to
`true`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]