Skip to content

Core: Support nulls in StructLike collections#2929

Merged
rdblue merged 1 commit into
apache:masterfrom
aokolnychyi:struct-collections-null
Aug 3, 2021
Merged

Core: Support nulls in StructLike collections#2929
rdblue merged 1 commit into
apache:masterfrom
aokolnychyi:struct-collections-null

Conversation

@aokolnychyi

Copy link
Copy Markdown
Contributor

Our JavaHashes are inconsistent in handling nulls. Specifically, only CharSequenceHash currently handles nulls correctly and all others fail with a NPE. In addition, our StructLike collections don't handle nulls too. It is possible to add a null object but never retrieve it.

@aokolnychyi

Copy link
Copy Markdown
Contributor Author

@RussellSpitzer RussellSpitzer 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.

LGTM

@rdblue rdblue merged commit 30639ef into apache:master Aug 3, 2021
@rdblue

rdblue commented Aug 3, 2021

Copy link
Copy Markdown
Contributor

Good catch, @aokolnychyi. Any context on where you found this and what kinds of issues it may have caused?

@aokolnychyi

aokolnychyi commented Aug 3, 2021

Copy link
Copy Markdown
Contributor Author

I was using this in new writers I have locally to keep track of what partitions we've seen. I had partitions as nulls for unpartitioned writes and it lead to inability to retrieve an existing writer.

Don't have a place in the existing codebase that is affected (did not check, to be precise).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants