klion26 commented on code in PR #9963:
URL: https://github.com/apache/arrow-rs/pull/9963#discussion_r3273529795


##########
parquet-variant-compute/src/variant_array_builder.rs:
##########
@@ -659,4 +690,190 @@ mod test {
         assert_eq!(array.value(2), 
array2.value(2).get_list_element(0).unwrap());
         assert_eq!(array.value(2), 
array2.value(2).get_list_element(1).unwrap());
     }
+
+    #[test]
+    fn build_shredded_primitive_int64() {
+        let mut b = VariantArrayBuilder::new(3);
+        b.append_variant(Variant::Int64(42));
+        b.append_variant(Variant::Int64(100));
+        b.append_null();
+        let arr = b.build_shredded(&DataType::Int64).unwrap();
+        assert!(arr.typed_value_field().is_some());
+        assert_eq!(arr.len(), 3);
+        assert!(!arr.is_null(0));

Review Comment:
   Currently, we only assert whether the item is null, maybe we can assert the 
content of `arr` here.



##########
parquet-variant-compute/src/variant_array_builder.rs:
##########
@@ -659,4 +690,190 @@ mod test {
         assert_eq!(array.value(2), 
array2.value(2).get_list_element(0).unwrap());
         assert_eq!(array.value(2), 
array2.value(2).get_list_element(1).unwrap());
     }
+
+    #[test]
+    fn build_shredded_primitive_int64() {
+        let mut b = VariantArrayBuilder::new(3);
+        b.append_variant(Variant::Int64(42));
+        b.append_variant(Variant::Int64(100));
+        b.append_null();
+        let arr = b.build_shredded(&DataType::Int64).unwrap();
+        assert!(arr.typed_value_field().is_some());
+        assert_eq!(arr.len(), 3);
+        assert!(!arr.is_null(0));

Review Comment:
   same as the tests below



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