Jefffrey commented on code in PR #10352:
URL: https://github.com/apache/arrow-rs/pull/10352#discussion_r3739709137
##########
parquet-variant/src/variant/metadata.rs:
##########
@@ -309,15 +309,19 @@ impl<'m> VariantMetadata<'m> {
current_offset = next_offset;
}
} else {
- // Validate offsets are in-bounds and monotonically increasing
- //
- // Since shallow validation ensures the first and last offsets
are in bounds,
- // we can also verify all offsets are in-bounds by checking if
- // offsets are monotonically increasing
- if !offsets.is_sorted_by(|a, b| a < b) {
- return Err(ArrowError::InvalidArgumentError(
- "offsets not monotonically increasing".to_string(),
- ));
+ // Slicing each dictionary value validates that offsets are
in-bounds, non-decreasing,
Review Comment:
small nit: original comment was correct in calling it monotonically
increasing, as monotonically increasing allows either staying flat or going up.
strict monotonically increasing is when its only going up (can't stay flat)
--
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]