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

Empty lists in FixedSizeListArray::try_new is not handled #4623

Closed
smiklos opened this issue Aug 2, 2023 · 4 comments · Fixed by #4626
Closed

Empty lists in FixedSizeListArray::try_new is not handled #4623

smiklos opened this issue Aug 2, 2023 · 4 comments · Fixed by #4626
Labels
arrow Changes to the arrow crate bug

Comments

@smiklos
Copy link
Contributor

smiklos commented Aug 2, 2023

Describe the bug

Passing 0 as size to FixedSizeListArray::try_new panics with division by zero.

To Reproduce

Call FixedSizeListArray::try_new with 0 as size.

Expected behavior

If FixedSizeListArrays should not hold empty values, an ArrowError::InvalidArgumentError should be returned, otherwise it should be possible to construct it with 0 as length of lists contained within.

Additional context

@smiklos smiklos added the bug label Aug 2, 2023
@smiklos
Copy link
Contributor Author

smiklos commented Aug 2, 2023

Can't seem to find forbidding empty values in the specification.

@tustvold
Copy link
Contributor

tustvold commented Aug 2, 2023

We should make this work, as you say the specification doesn't forbid it, although the utility of such a construction eludes me 😅

@smiklos
Copy link
Contributor Author

smiklos commented Aug 2, 2023

I'll make a pr

@tustvold tustvold added the arrow Changes to the arrow crate label Aug 15, 2023
@tustvold
Copy link
Contributor

label_issue.py automatically added labels {'arrow'} from #4626

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 bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants