tustvold commented on code in PR #7051:
URL: https://github.com/apache/arrow-rs/pull/7051#discussion_r1937409651
##########
arrow-schema/src/datatype.rs:
##########
@@ -1129,4 +1138,18 @@ mod tests {
let data_type: DataType = "UInt64".parse().unwrap();
assert_eq!(data_type, DataType::UInt64);
}
+
+ #[test]
+ fn test_display_list() {
+ let list_data_type =
DataType::List(Arc::new(Field::new_list_field(DataType::Int32, true)));
+ let list_data_type_string = list_data_type.to_string();
+ let expected_string = "List(Int32;N)";
+ assert_eq!(list_data_type_string, expected_string);
+
+ let list_data_type =
+ DataType::List(Arc::new(Field::new_list_field(DataType::UInt64,
false)));
+ let list_data_type_string = list_data_type.to_string();
+ let expected_string = "List(UInt64)";
+ assert_eq!(list_data_type_string, expected_string);
Review Comment:
Perhaps we could get a test of a nested list as well
--
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]