-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Describe the bug
The filter kernel attempt to filter runs of contiguous slices, this currently breaks for UnionArrays.
To Reproduce
#[test]
fn test_filter_run_union_array_dense() {
let mut builder = UnionBuilder::new_dense(3);
builder.append::<Int32Type>("A", 1).unwrap();
builder.append::<Int32Type>("A", 3).unwrap();
builder.append::<Int32Type>("A", 34).unwrap();
let array = builder.build().unwrap();
let filter_array = BooleanArray::from(vec![true, true, false]);
let c = filter(&array, &filter_array).unwrap();
let filtered = c.as_any().downcast_ref::<UnionArray>().unwrap();
let mut builder = UnionBuilder::new_dense(3);
builder.append::<Int32Type>("A", 1).unwrap();
builder.append::<Int32Type>("A", 3).unwrap();
let expected = builder.build().unwrap();
assert_eq!(filtered.data(), expected.data());
}
Expected behavior
The above test should pass
Additional context
Add any other context about the problem here.
Reactions are currently unavailable