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

FixedSizeList got out of range when the total length of the underlying values over i32::MAX #5901

Closed
BubbleCal opened this issue Jun 17, 2024 · 1 comment · Fixed by #5902
Labels
arrow Changes to the arrow crate bug

Comments

@BubbleCal
Copy link
Contributor

Describe the bug
I have a Float32Array which is with length over i32::MAX,
and then create FixedSizeList from this array values.
when access with index i where i * value_length is over the i32::MAX, get panic or error "offset overflow"

To Reproduce

#[test]
fn test_arrow_fsl() {
    let arr = Float32Array::from_iter_values(iter::repeat(0.0).take(i32::MAX as usize + 2));
    let fsl = FixedSizeListArray::try_new_from_values(arr.clone(), 1).unwrap();
    let value = fsl.value(arr.len() - 1);
    assert_eq!(value.len(), 1);
}

Expected behavior
access the value without panic/error if i * value_length is not over usize::MAX

@alamb
Copy link
Contributor

alamb commented Jul 2, 2024

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

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