FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-399: Check for null writers in DenseUnionWriter#setPosition by Kaustav-Sarkar · Pull Request #938 · apache/arrow-java · GitHub

GH-399: Check for null writers in DenseUnionWriter#setPosition - #938

Merged
lidavidm merged 3 commits into
apache:mainfrom
Kaustav-Sarkar:GH-399-dense-union-writer-nullpointer
Dec 29, 2025
Merged

GH-399: Check for null writers in DenseUnionWriter#setPosition#938
lidavidm merged 3 commits into
apache:mainfrom
Kaustav-Sarkar:GH-399-dense-union-writer-nullpointer

Conversation

Copy link
Copy Markdown
Contributor

GH-399 Fix setPosition fails with NullPointerException

Fixed a NullPointerException in DenseUnionWriter#setPosition.

The issue was that setPosition tried to update all writers in its internal array, even if they hadn't been initialized yet. I added a null check so it only updates writers that actually exist.

Also added a regression test (TestDenseUnionWriterNPE) to verify the fix and updated .gitignore.

Closes #399.

Added null checks for setPosition and test cases to validate the issue
Kaustav-Sarkar changed the title GH-399 Fix setPosition fails with NullPointerException GH-399: Fix setPosition fails with NullPointerException Dec 24, 2025

This comment has been minimized.

Copy link
Copy Markdown
Contributor Author

I do not have permissions to set labels

❯ gh pr edit 938 --add-label "bug-fix"

GraphQL: Kaustav-Sarkar does not have the correct permissions to execute `AddLabelsToLabelable` (addLabelsToLabelable)

lidavidm added the bug-fix PRs that fix a big. label Dec 25, 2025
github-actions Bot added this to the 18.4.0 milestone Dec 25, 2025
lidavidm changed the title GH-399: Fix setPosition fails with NullPointerException GH-399: Check for null writers in DenseUnionWriter#setPosition Dec 25, 2025

lidavidm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you!

Copy link
Copy Markdown
Member

Ok. The JNI test is an upstream build issue, but @Kaustav-Sarkar can you fix the format error in .gitignore? https://github.com/apache/arrow-java/actions/runs/20526378098/job/59055944634?pr=938

lidavidm merged commit 8d1802c into apache:main Dec 29, 2025
20 of 25 checks passed
ennuite pushed a commit to ennuite/arrow-java that referenced this pull request Jan 8, 2026
…pache#938)

## apacheGH-399 Fix setPosition fails with NullPointerException

Fixed a `NullPointerException` in `DenseUnionWriter#setPosition`.

The issue was that `setPosition` tried to update all writers in its
internal array, even if they hadn't been initialized yet. I added a null
check so it only updates writers that actually exist.

Also added a regression test (`TestDenseUnionWriterNPE`) to verify the
fix and updated `.gitignore`.

Closes apache#399.
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

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java] DenseUnionWriter#setPosition fails with NullPointerException

2 participants


Back | FazBrowse Home | New Git URL