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
Describe the bug compute::binary_mut returns Err(PrimitiveArray<T>) in cases when the underlying buffer is not shared (as described in the documentation). It only happens when passing certain arrays.
To Reproduce
Err case:
let a = Int32Array::from(vec![
Some(3),
Some(4),
Some(5),
Some(6),
None,
]);
let b = Int32Array::from(vec![
Some(10),
Some(11),
Some(12),
Some(13),
Some(14),
]);
let a = binary_mut(a, &b, |a, b| a + b);
produces
Err(PrimitiveArray<Int32>
[
3,
4,
5,
6,
null,
])
Ok case:
let a = Int32Array::from(vec![
Some(3),
Some(4),
Some(5),
Some(6),
None,
]);
let b = Int32Array::from(vec![
Some(10),
Some(11),
None,
Some(13),
Some(14),
]);
let a = binary_mut(a, &b, |a, b| a + b);
let a = Int32Array::from(vec![
Some(3),
Some(4),
Some(5),
Some(6),
None,
Some(8)
]);
let b = Int32Array::from(vec![
Some(10),
Some(11),
Some(12),
Some(13),
Some(14),
Some(15),
]);
let a = binary_mut(a, &b, |a, b| a + b);
let a = Int32Array::from(vec![
Some(3),
Some(4),
Some(5),
Some(6),
None,
Some(8)
]);
let b = Int32Array::from(vec![
Some(10),
Some(11),
Some(12),
Some(13),
Some(14),
None,
]);
let a = binary_mut(a, &b, |a, b| a + b);
Unfortunately I haven't had time to dig deeper into it yet, but it would seem to indicate that the null buffer references the scalar buffer when using the From<Vec<Option<T>>> trait to construct the array, which in turns causes the shared buffer error on binary_mut?
Describe the bug
compute::binary_mut
returnsErr(PrimitiveArray<T>)
in cases when the underlying buffer is not shared (as described in the documentation). It only happens when passing certain arrays.To Reproduce
produces
produces
Expected behavior
I would have expected the first case to produce
Additional context
Additional cases
produces
produces
The errors seem to be associated with an uneven number of null values.
The text was updated successfully, but these errors were encountered: