You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[test]
fn test_take_fixed_list_null_indices() {
let indices = Int32Array::new(vec![0, 1].into(), Some(NullBuffer::from(vec![true, false])));
let values = Arc::new(Int32Array::from(vec![0, 1, 2, 3]));
let arr_field = Arc::new(Field::new("item", values.data_type().clone(), true));
let values = FixedSizeListArray::try_new(arr_field, 2, values, None).unwrap();
let r = take(&values, &indices, None).unwrap();
let values = r
.as_fixed_size_list()
.values()
.as_primitive::<Int32Type>()
.into_iter()
.collect::<Vec<_>>();
assert_eq!(&values, &[Some(0), Some(1), None, None])
}
Expected behavior
There is no panic and the take operation returns what is expected.
Additional context
I encountered this issue running full outer joins in datafusion on batches that have fixed size list arrays in the payloads. The outer join implementation appears to materialize nulls (when one side doesn't match) by using take with null indices.
The text was updated successfully, but these errors were encountered:
Describe the bug
When running
arrow_select::take::take
on aFixedSizeListArray
and passing in indices that contain null then there is a panic:To Reproduce
Expected behavior
There is no panic and the take operation returns what is expected.
Additional context
I encountered this issue running full outer joins in datafusion on batches that have fixed size list arrays in the payloads. The outer join implementation appears to materialize nulls (when one side doesn't match) by using take with null indices.
The text was updated successfully, but these errors were encountered: