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


##########
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:
   That doesn't seem to be valid?
   
   ```rust
   error: format argument must be a string literal
      --> arrow-schema/src/field.rs:460:133
       |
   460 |         assert_eq!("Schema error: Fail to merge schema field 'c1' 
because the from data_type = Float32 does not equal Int64", "{}", result);
       |                                                                        
                                                             ^^^^^^
       ```



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to