Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Constructing Non-Empty StructArray with no Fields (#4842) #4845

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #4842

Rationale for this change

I'm not really sure of the use-case for this, but I guess it isn't prohibited by the specification...

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 21, 2023
Copy link
Contributor

@crepererum crepererum left a comment

Choose a reason for hiding this comment

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

I think one usecase could be if you map other data formats (like the bug report mentioned) that support this or if you project another struct type with an empty selection (something like select_fields(existing, [])). Now in both cases this is somewhat of a degenerative edge case, but might make downstream code simpler since they don't need another "if it's empty, do something else" clause.

@tustvold tustvold merged commit 72a2dab into apache:master Sep 25, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StructBuilder doesn't handle nulls correctly for empty structs
2 participants