We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cast_with_options
Describe the bug
If we have None as the first element in ListArray, it panics when we call cast_with_options
None
To Reproduce
#[test] fn test_first_none_will_panic() { //Panic let array = Arc::new(ListArray::from_iter_primitive::<Int64Type,_,_>(vec![None, Some(vec![Some(1), Some(2), Some(3)])])) as ArrayRef; let data_type = DataType::FixedSizeList(FieldRef::new(Field::new("item", DataType::Int64, true)), 3); let opt = CastOptions::default(); let r = cast_with_options(&array, &data_type, &opt); } #[test] fn test_non_first_none_pass() { //Panic let array = Arc::new(ListArray::from_iter_primitive::<Int64Type,_,_>(vec![Some(vec![Some(1), None, Some(3)])])) as ArrayRef; let data_type = DataType::FixedSizeList(FieldRef::new(Field::new("item", DataType::Int64, true)), 3); let opt = CastOptions::default(); let r = cast_with_options(&array, &data_type, &opt); }
Expected behavior
Should return correct casted array
Additional context
The text was updated successfully, but these errors were encountered:
take
Sorry, something went wrong.
ListArray
irenjj
Successfully merging a pull request may close this issue.
Describe the bug
If we have
None
as the first element in ListArray, it panics when we callcast_with_options
To Reproduce
Expected behavior
Should return correct casted array
Additional context
The text was updated successfully, but these errors were encountered: