istvan-fodor commented on code in PR #5541:
URL: https://github.com/apache/arrow-rs/pull/5541#discussion_r1555879140
##########
arrow-array/src/builder/fixed_size_list_builder.rs:
##########
@@ -248,9 +325,37 @@ mod tests {
}
#[test]
- fn test_fixed_size_list_array_builder_finish_cloned() {
+ fn test_fixed_size_list_array_builder_with_field() {
+ let builder = make_list_builder(false, false);
+ let mut builder = builder.with_field(Field::new("list_element",
DataType::Int32, false));
+ let list_array = builder.finish();
+
+ assert_eq!(DataType::Int32, list_array.value_type());
+ assert_eq!(4, list_array.len());
+ assert_eq!(0, list_array.null_count());
+ assert_eq!(6, list_array.value_offset(2));
+ assert_eq!(3, list_array.value_length());
+ }
+
+ #[test]
+ #[should_panic(
+ expected = "field is nullable = false, but the values_builder contains
null values"
Review Comment:
hi @alamb. this is not a 0 sized list. I created the `make_list_builder` to
construct builders (you recommended something similar when I first opened the
PR). The two boolean parameters control whether to include a null in the
builder and to include a particular fixed size list that has a null element.
--
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]