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
When operating on an array that was sliceed, the result of min is incorrect
min([Null, 4.0] --> should be 4.0
However,
min([Null, Null, Null, Null, Null, Null, 4.0].slice(4,2)) --> should be 4.0 as well but returns None
To Reproduce
Use this program:
use arrow::{array::{Float64Array,Array, as_primitive_array}, datatypes::Float64Type};fnmain(){// behavior of sliced min changed (TODO make a demonstration)// Input is [None, 4.0], min value should be 4.0let expected_min = Some(4.0);let input:Float64Array = vec![None, Some(4.0)].into_iter().collect();let min = arrow::compute::min(&input);assert_eq!(min, expected_min);// however, when sliced the min value is incorrectlet sliced_input:Float64Array = vec![None, None, None, None, None, Some(4.0)].into_iter().collect();let sliced_input = sliced_input.slice(4,2);let sliced_input = as_primitive_array::<Float64Type>(&sliced_input);// The array valare are equalassert_eq!(sliced_input, &input);// but the minimum is notlet sliced_min = arrow::compute::min(&sliced_input);assert_eq!(sliced_min, expected_min);}
Expected behavior
The example should pass. It passes on arrow 22.0.0 but fails on arrow 23.0.0 like this:
Describe the bug
When operating on an array that was
slice
ed, the result ofmin
is incorrectHowever,
To Reproduce
Use this program:
Expected behavior
The example should pass. It passes on arrow
22.0.0
but fails on arrow23.0.0
like this:Additional context
Found while debugging upgrade in IOx: https://github.com/influxdata/influxdb_iox/pull/5694
The text was updated successfully, but these errors were encountered: