viirya commented on code in PR #3662:
URL: https://github.com/apache/arrow-rs/pull/3662#discussion_r1102142506
##########
arrow-data/src/data.rs:
##########
@@ -1514,9 +1514,10 @@ impl ArrayData {
Ok(())
})?;
- if prev_value.as_usize() != array_len {
+ if prev_value.as_usize() < (self.offset + self.len) {
return Err(ArrowError::InvalidArgumentError(format!(
- "The length of array does not match the last value in the
run_ends array. The last value of run_ends array is {prev_value} and length of
array is {array_len}."
+ "The offset + length of array should be lte last value in the
run_ends array. The last value of run_ends array is {prev_value} and offset +
length of array is {}.",
Review Comment:
```suggestion
"The offset + length of array should be less or equal last
value in the run_ends array. The last value of run_ends array is {prev_value}
and offset + length of array is {}.",
```
--
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]