thorfour opened a new issue, #9179:
URL: https://github.com/apache/arrow-rs/issues/9179
**Describe the bug**
`index out of bounds: the len is 0 but the index is 18446744073709551615`
**To Reproduce**
```rust
#[test]
fn test_take_run_empty_indices() {
let mut builder = PrimitiveRunBuilder::<Int32Type, Int32Type>::new();
builder.extend([Some(1), Some(1), Some(2), Some(2)]);
let run_array = builder.finish();
let logical_indices: PrimitiveArray<Int32Type> =
PrimitiveArray::from(Vec::<i32>::new());
let result = take_run(&run_array, &logical_indices);
assert!(matches!(result, Err(ArrowError::InvalidArgumentError(_))));
}
```
**Expected behavior**
I would expect either an empty array returned or an invalid argument error.
**Additional context**
We have a call to `take_record_batch` that is somehow causing `take_run` to
be called with an empty indices array and causing this panic. Note that our
call to `take_record_batch` does not use an empty indices array.
--
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]