samarthjain commented on a change in pull request #3533:
URL: https://github.com/apache/iceberg/pull/3533#discussion_r748053654
##########
File path:
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/NullabilityHolder.java
##########
@@ -75,6 +77,7 @@ public int numNulls() {
}
public void reset() {
+ // TODO: do we have reset the values too?
Review comment:
That's correct, @aokolnychyi . When I wrote this, there was inherent
assumption that the user of this class will be calling `setNull(index)` and
`setNotNull(index)` for every row in the batch which is why reset() didn't
reinitialize or assign a new `byte[]` for `isNull`. See the comment at the top
the class
```
/**
* Instances of this class simply track whether a value at an index is null.
* For simplicity and performance, it is expected that various setter methods
* {@link #setNull(int)}, {@link #setNulls(int, int)}, {@link
#setNotNull(int)}
* and {@link #setNotNulls(int, int)} are invoked with monotonically
* increasing values for the index parameter.
*/
```
Although, looking at this code now, I agree with @RussellSpitzer that we
could simply reinitialize the `isNull` array again.
--
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]