scovich commented on code in PR #8627:
URL: https://github.com/apache/arrow-rs/pull/8627#discussion_r2433182260


##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -1465,4 +1465,33 @@ mod test {
             Variant::ShortString(ShortString::try_new("norm").unwrap())
         );
     }
+
+    #[test]
+    fn test_variant_equality() {
+        let v_iter = [None, Some(Variant::BooleanFalse), Some(Variant::Null), 
None];
+        let v = VariantArray::from_iter(v_iter.clone());
+
+        {
+            let v_copy = v.clone();
+            assert_eq!(v, v_copy);
+        }
+
+        {
+            let v_iter_reversed = {
+                let mut v = v_iter.clone();
+                v.reverse();
+
+                v
+            };
+
+            let v_reversed = VariantArray::from_iter(v_iter_reversed);

Review Comment:
   Well, not quite... the `v_iter` name is misleading because it's not an 
iterator. But `v.clone().into_iter().rev()` would work, as would 
`v.iter().cloned().rev()`



-- 
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]

Reply via email to