etseidl commented on code in PR #8603:
URL: https://github.com/apache/arrow-rs/pull/8603#discussion_r2430124709
##########
parquet/src/file/statistics.rs:
##########
@@ -1085,4 +1093,32 @@ mod tests {
is_min_max_deprecated,
))
}
+
+ #[test]
+ fn test_int96_invalid_statistics() {
+ let mut thrift_stats = PageStatistics {
+ max: None,
+ min: Some(vec![1, 2, 3]),
Review Comment:
```suggestion
min: Some((0..13).collect()),
```
##########
parquet/src/file/statistics.rs:
##########
@@ -1085,4 +1093,32 @@ mod tests {
is_min_max_deprecated,
))
}
+
+ #[test]
+ fn test_int96_invalid_statistics() {
+ let mut thrift_stats = PageStatistics {
+ max: None,
+ min: Some(vec![1, 2, 3]),
+ null_count: Some(0),
+ distinct_count: None,
+ max_value: None,
+ min_value: None,
+ is_max_value_exact: None,
+ is_min_value_exact: None,
+ };
+
+ let err = from_thrift_page_stats(Type::INT96,
Some(thrift_stats.clone())).unwrap_err();
+ assert_eq!(
+ err.to_string(),
+ "Parquet error: Incorrect Int96 min statistics"
+ );
+
+ thrift_stats.min = None;
+ thrift_stats.max = Some(vec![1, 2, 3]);
Review Comment:
```suggestion
thrift_stats.max = Some((0..13).collect());
```
--
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]