tustvold opened a new issue, #1596:
URL: https://github.com/apache/arrow-rs/issues/1596

   **Describe the bug**
   
   build_extend_dense blindly copies offsets from the source array across, 
which can lead to invalid offsets in the filtered array
   
   **To Reproduce**
   
   ```
   let mut builder = UnionBuilder::new_dense(4);
   builder.append::<Int32Type>("A", 1).unwrap();
   builder.append::<Float64Type>("B", 3.2).unwrap();
   builder.append::<Float64Type>("B", 3.2).unwrap();
   let array = builder.build().unwrap();
   
   let filter_array = BooleanArray::from(vec![true, false, true]);
   let c = filter(&array, &filter_array).unwrap();
   let filtered = c.as_any().downcast_ref::<UnionArray>().unwrap();
   
   filtered.value(1);
   ```
   
   Panics with
   
   ```
   thread 
'compute::kernels::filter::tests::test_filter_union_array_dense_with_nulls' 
panicked at 'assertion failed: (offset + length) <= self.len()', 
arrow/src/array/data.rs:486:9
   ****
   ```
   
   **Expected behavior**
   
   This should not panic


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to