tustvold commented on code in PR #3113:
URL: https://github.com/apache/arrow-rs/pull/3113#discussion_r1023095660


##########
arrow-schema/src/field.rs:
##########
@@ -443,6 +443,15 @@ mod test {
     use std::collections::hash_map::DefaultHasher;
     use std::hash::{Hash, Hasher};
 
+    #[test]
+    fn test_merge_incompatible_types() {
+        let mut field = Field::new("c1", DataType::Int64, false);
+        let result = field
+            .try_merge(&Field::new("c1", DataType::Float32, true))
+            .expect_err("should fail");
+        assert_eq!("Schema error: Fail to merge schema field 'c1' because the 
from data_type = Float32 does not equal Int64", format!("{}", result));

Review Comment:
   Oh sorry, brain fart `result.to_string()` perhaps?



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