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

FixedSizeListArray::try_new Errors on Entirely Null Array With Size 0 #5614

Closed
tustvold opened this issue Apr 9, 2024 · 1 comment · Fixed by #5612
Closed

FixedSizeListArray::try_new Errors on Entirely Null Array With Size 0 #5614

tustvold opened this issue Apr 9, 2024 · 1 comment · Fixed by #5612
Labels
arrow Changes to the arrow crate bug

Comments

@tustvold
Copy link
Contributor

tustvold commented Apr 9, 2024

Describe the bug

To Reproduce

#[test]
fn empty_fixed_size_list() {
    let field = Arc::new(Field::new("item", DataType::Int32, true));
    let nulls = NullBuffer::new_null(2);
    let values = new_empty_array(&DataType::Int32);
    let list = FixedSizeListArray::new(field.clone(), 0, values, Some(nulls));
    assert_eq!(list.len(), 2);
}

Expected behavior

The test should pass (no rows is a valid non nullable array)

Additional context

@tustvold tustvold added the bug label Apr 9, 2024
tustvold added a commit to tustvold/arrow-rs that referenced this issue Apr 9, 2024
tustvold added a commit that referenced this issue Apr 9, 2024
* Use FixedSizeListArray::new in FixedSizeListBuilder

* Fix handling of entirely null zero-sized list array (#5614)

* Fix
@tustvold tustvold added the arrow Changes to the arrow crate label Apr 17, 2024
@tustvold
Copy link
Contributor Author

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

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.

1 participant