tustvold opened a new issue, #1814:
URL: https://github.com/apache/arrow-rs/issues/1814
**Describe the bug**
```
fn test_sliced_array_child() {
let values = Int32Array::from_iter_values([1, 2, 3]);
let values_sliced = values.slice(1, 2);
let offsets = Buffer::from_iter([1_i32, 3_i32]);
let list_field = Field::new("element", DataType::Int32, false);
let data_type = DataType::List(Box::new(list_field));
let data = unsafe {
ArrayData::new_unchecked(
data_type,
1,
None,
None,
0,
vec![offsets],
vec![values_sliced.data().clone()],
)
};
let err = data.validate_dictionary_offset().unwrap_err();
assert_eq!(err.to_string(), "Invalid argument error: Offset invariant
failure: offset at position 1 out of bounds: 3 > 2");
}
```
Should pass, however, `validate_dictionary_offset` does not use the correct
max offset during validation.
The good news is that the logic in `validate()` is correct, and will catch
that the final offset is too large, and so this will be caught by
`full_validate()` (i.e. this is not a soundness issue)
**To Reproduce**
See test
**Expected behavior**
The test should pass
**Additional context**
Add any other context about the problem here.
--
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]