apache / apache/iceberg

NullabilityHolder.reset() does not clear the isNull array

Open Beginner friendly
#15,808 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
9.2k
Forks
3.5k
Avg merge
2d 16h
Merged PRs (30d)
129

Description

### Apache Iceberg version

None

### Query engine

None

### Please describe the bug 🐞

`NullabilityHolder.reset()` resets `numNulls` but not the `isNull` byte array, leaving stale null markers from the previous batch.

```java
NullabilityHolder holder = new NullabilityHolder(10);
holder.setNull(3);
holder.reset();
holder.hasNulls(); // false
holder.isNullAt(3); // 1 — stale
```

The other two arrays (`nulls`, `nonNulls`) are immutable `arraycopy` source buffers and do not need clearing.

### Willingness to contribute

- [x] I can contribute a fix for this bug independently
- [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time

Contributor guide

Open the contributing guide

Research direction

Locate the Java implementation of NullabilityHolder and inspect reset(), setNull(), hasNulls(), and isNullAt(). Reproduce the reported sequence with a focused test, then verify that reset removes the stale marker while preserving the existing behavior of the other arrays.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.