You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "maltzsama (via GitHub)" <gi...@apache.org> on 2026/07/25 10:25:05 UTC
[PR] fix(ArrowBuilder): correct null bit checking logic and add tests [arrow-swift]
maltzsama opened a new pull request, #181:
URL: https://github.com/apache/arrow-swift/pull/181
## What's Changed
`BaseBufferBuilder.isNull(_:)` was returning the inverse of the null state. When `append()` writes a non-null value, it calls `setBit`; when writing null, it calls `clearBit`. So a set bit means valid. The function was returning `isSet()`, which means it reported valid values as null and null values as valid.
This fix removes the inverted logic and aligns with `ArrowData.isNull()`, which correctly uses `!isSet()`.
Removed redundant `ListBufferBuilder.isNull()` override that is now identical to the base implementation.
## Testing
Added comprehensive unit tests covering:
- Single null and non-null values
- Multiple mixed nulls and values
- All-null cases
- All-non-null cases
All 7 new tests pass. Existing test suite continues to pass.
## Impact
No code inside the library calls the builders' `isNull` — all internal readers go through `ArrowData.isNull` — so this affects external users of the public builder API only.
Closes #180
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(ArrowBuilder): correct null bit checking logic and add tests [arrow-swift]
Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on PR #181:
URL: https://github.com/apache/arrow-swift/pull/181#issuecomment-5078572069
@willtemperley Could you review this?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org