andygrove commented on a change in pull request #8171:
URL: https://github.com/apache/arrow/pull/8171#discussion_r487425813
##########
File path: rust/arrow/src/compute/kernels/aggregate.rs
##########
@@ -149,4 +202,18 @@ mod tests {
assert_eq!(5, min(&a).unwrap());
assert_eq!(9, max(&a).unwrap());
}
+
+ #[test]
+ fn test_string_min_max_with_nulls() {
+ let a = StringArray::from(vec![Some("b"), None, None, Some("a"),
Some("c")]);
+ assert_eq!("a", min_string(&a).unwrap());
+ assert_eq!("c", max_string(&a).unwrap());
+ }
+
+ #[test]
+ fn test_string_min_max_all_nulls() {
Review comment:
Could you add an additional test with an array with one or more `None`
at the start, followed by one or more `Some` to see if I am correct about my
earlier comment?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]