Arrow: Document NullabilityHolder.reset() null-marker contract#17252
Open
thswlsqls wants to merge 1 commit into
Open
Arrow: Document NullabilityHolder.reset() null-marker contract#17252thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
reset() clears only the null count and intentionally leaves the isNull marker array as-is. Writers repopulate every index of each batch before the markers are read, so stale values are overwritten rather than observed. Document this so the behavior is not mistaken for a bug. Generated-by: Claude Code
ldudas-marx
reviewed
Jul 16, 2026
Comment on lines
+81
to
+85
| * <p>Only the null count is cleared. The per-index markers returned by {@link #isNullAt(int)} are | ||
| * deliberately left untouched: for every batch, writers set the marker of each index through | ||
| * {@link #setNull(int)}/{@link #setNotNull(int)} (or their bulk variants {@link #setNulls(int, | ||
| * int)}/{@link #setNotNulls(int, int)}) before the markers are read, so values carried over from | ||
| * a previous batch are overwritten rather than observed. |
There was a problem hiding this comment.
I would put these into the function body as comments because it contains implementation details and insights. It targets developers who want to change this class and not the users who want to use this class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the behavior reported in #15808
Summary
NullabilityHolder.reset()clears onlynumNulls; theisNullmarker array read byisNullAt(int)is left as-is.VectorizedParquetDefinitionLevelReadersets the marker of each index viasetNull/setNotNull(or the bulksetNulls/setNotNulls) before any marker is read, so values from a previous batch are overwritten rather than observed.reset()stating this contract, so the behavior is not mistaken for a stale-state bug.reset().Testing done
./gradlew :iceberg-arrow:spotlessCheck— passed../gradlew :iceberg-arrow:checkstyleMain— passed.