MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_nullable_union

Function test_nullable_union

arrow-array/src/array/list_array.rs:1330–1341  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1328
1329 #[test]
1330 fn test_nullable_union() {
1331 let offsets = OffsetBuffer::new(vec![0, 1, 4, 5].into());
1332 let mut builder = UnionBuilder::new_dense();
1333 builder.append::<Int32Type>("a", 1).unwrap();
1334 builder.append::<Int32Type>("b", 2).unwrap();
1335 builder.append::<Int32Type>("b", 3).unwrap();
1336 builder.append::<Int32Type>("a", 4).unwrap();
1337 builder.append::<Int32Type>("a", 5).unwrap();
1338 let values = builder.build().unwrap();
1339 let field = Arc::new(Field::new("element", values.data_type().clone(), false));
1340 ListArray::new(field.clone(), offsets, Arc::new(values), None);
1341 }
1342
1343 #[test]
1344 fn test_list_new_null_len() {

Callers

nothing calls this directly

Calls 3

buildMethod · 0.45
cloneMethod · 0.45
data_typeMethod · 0.45

Tested by

no test coverage detected