Rich-T-kid commented on code in PR #10328:
URL: https://github.com/apache/arrow-rs/pull/10328#discussion_r3567875383
##########
arrow-schema/src/ffi.rs:
##########
@@ -1008,6 +1009,16 @@ mod tests {
}
}
+ #[test]
+ fn test_name_with_null_byte() {
+ let schema = FFI_ArrowSchema::try_new("i", vec![], None).unwrap();
+ let err = schema.with_name("ab\0cd").unwrap_err();
+ assert_eq!(
+ err.to_string(),
+ "C Data interface error: Null byte at position 2 not allowed in
name"
+ );
Review Comment:
I think asserting that this errors is good enough. the function can only
fail in one way and if the error msg changes for what ever reason it will cause
this test to fail even though it correctly returns an error
--
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]