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

fix: take on empty struct array returns empty array #7224

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

westonpace
Copy link
Member

@westonpace westonpace commented Mar 2, 2025

Which issue does this PR close?

Rationale for this change

See PR

What changes are included in this PR?

Minor change to take impl for struct arrays to account for the no-fields case

Are there any user-facing changes?

No

@github-actions github-actions bot added the arrow Changes to the arrow crate label Mar 2, 2025
Copy link
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

This looks good to me, although given the never-ending source of bugs I wonder if we should be altering the constructors to force specifying the length...

@alamb
Copy link
Contributor

alamb commented Mar 6, 2025

CI failure https://github.com/apache/arrow-rs/actions/runs/13617521791/job/38062531668?pr=7224 seems related to a network issue. I restarted the check

@westonpace
Copy link
Member Author

Thanks @tustvold / @alamb I technically have write permissions here but I haven't done arrow-rs merges before. Do you use a merge script (I don't see one) or just hit the "squash and merge" button?

@alamb
Copy link
Contributor

alamb commented Mar 6, 2025

Thanks @tustvold / @alamb I technically have write permissions here but I haven't done arrow-rs merges before. Do you use a merge script (I don't see one) or just hit the "squash and merge" button?

We just "hit the green button" 🚀

Screenshot 2025-03-06 at 2 44 09 PM

@westonpace westonpace merged commit 40af786 into apache:main Mar 6, 2025
27 checks passed
@westonpace
Copy link
Member Author

That's too easy 😆

@westonpace
Copy link
Member Author

This looks good to me, although given the never-ending source of bugs I wonder if we should be altering the constructors to force specifying the length...

I agree it is probably a good idea. It would be a breaking change. I created #7247 . There was only one test case that needed modified (I don't think empty struct arrays are a common case)

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.

StructArray take returns incorrect length with empty fields
3 participants