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
Adjust array_data_slice_problem, add element Some("a"):
#[test]
fn array_bug_2() {
let strings: ArrayRef = Arc::new(StringArray::from(vec![
Some("a"),
None,
Some("b"),
]));
let strings_slice = strings.slice(2, 1);
let strings2: ArrayRef = Arc::new(StringArray::from(vec![
Some("b"),
]));
assert_eq!(&strings2, &strings_slice, "\n##1: {:?}\n##2: {:?}", strings2.data(), strings_slice.data());
}
Panic on call to `strings.slice(2, 1)`:
thread 'array::transform::tests::array_bug_2' panicked at 'range end index 2 out of range for slice of length 0', arrow/src/array/equal/utils.rs:81:49
Activity
asfimport commentedon Jan 15, 2021
Qingyou Meng / @mqy:
@jorgecarleitao
Test passed if construct the
expectdirectly (not from slice()).look like the problem is caused by ArrayRef::slice(), which contains cloned buffers and null bitmap.
array_data_slice_problemto verify failure case 1:array_data_slice_problem, add elementSome("a"):asfimport commentedon Jan 15, 2021
Jorge Leitão / @jorgecarleitao:
great finding. cc [~nevi_me]
asfimport commentedon Jan 15, 2021
Andrew Lamb / @alamb:
Thanks @mqy – this is a really nice one find and well written ticket
asfimport commentedon Jan 30, 2021
Jorge Leitão / @jorgecarleitao:
Issue resolved by pull request 9211
#9211