()
| 400 | } |
| 401 | |
| 402 | fn make_large_list_array() -> LargeListArray { |
| 403 | // Construct a value array |
| 404 | let value_data = ArrayData::builder(DataType::Int32) |
| 405 | .len(8) |
| 406 | .add_buffer(Buffer::from_slice_ref([0, 1, 2, 3, 4, 5, 6, 7])) |
| 407 | .build() |
| 408 | .unwrap(); |
| 409 | |
| 410 | // Construct a buffer for value offsets, for the nested array: |
| 411 | // [[0, 1, 2], [3, 4, 5], [6, 7]] |
| 412 | let value_offsets = Buffer::from_slice_ref([0i64, 3, 6, 8]); |
| 413 | |
| 414 | // Construct a list array from the above two |
| 415 | let list_data_type = |
| 416 | DataType::LargeList(Arc::new(Field::new_list_field(DataType::Int32, true))); |
| 417 | let list_data = ArrayData::builder(list_data_type) |
| 418 | .len(3) |
| 419 | .add_buffer(value_offsets) |
| 420 | .add_child_data(value_data) |
| 421 | .build() |
| 422 | .unwrap(); |
| 423 | LargeListArray::from(list_data) |
| 424 | } |
| 425 | |
| 426 | fn make_union_array() -> UnionArray { |
| 427 | let mut builder = UnionBuilder::with_capacity_dense(7); |
nothing calls this directly
no test coverage detected