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


##########
parquet-variant-compute/src/shred_variant.rs:
##########


Review Comment:
   Do we need to uncomment this check in current PR?



##########
parquet-variant-compute/src/variant_array.rs:
##########
@@ -1632,4 +1774,63 @@ mod test {
         ),]),
         "Cast error: Cast failed at index 0 (array type: Decimal128(38, 10)): 
Invalid argument error: 123456789012345678901234567890123456789 is wider than 
max precision 38"
     );
+
+    #[test]
+    fn test_fixed_size_binary_without_uuid_extension() {
+        let uuid_bytes = vec![
+            0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 
0x67, 0x89, 0xab,
+            0xcd, 0xef,
+        ];
+        let fixed_size_binary = 
FixedSizeBinaryArray::from(vec![uuid_bytes.as_slice()]);
+
+        let metadata =
+            
BinaryViewArray::from_iter_values(std::iter::repeat_n(EMPTY_VARIANT_METADATA_BYTES,
 1));
+
+        // create a field without the uuid extension type
+        let field = Field::new("typed_value", DataType::FixedSizeBinary(16), 
true);
+
+        let struct_array = StructArrayBuilder::new()
+            .with_column_name("metadata", Arc::new(metadata), false)
+            .with_field_ref(Arc::new(field), Arc::new(fixed_size_binary))
+            .build();
+
+        let variant_array =
+            VariantArray::try_new(&struct_array).expect("should create variant 
array");
+
+        let res = variant_array.try_value(0);
+        assert!(res.is_err())

Review Comment:
   Do we need to assert the error message here?



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