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

Function test_primitive_null_offset

arrow/tests/array_transform.rs:115–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113/// tests extending from a primitive array with offset and nulls
114#[test]
115fn test_primitive_null_offset() {
116 let b = UInt8Array::from(vec![Some(1), None, Some(3)]);
117 let b = b.slice(1, 2).into_data();
118 let arrays = vec![&b];
119 let mut a = MutableArrayData::new(arrays, false, 2);
120 a.extend(0, 0, 2);
121 let result = a.freeze();
122 let array = UInt8Array::from(result);
123 let expected = UInt8Array::from(vec![None, Some(3)]);
124 assert_eq!(array, expected);
125}
126
127#[test]
128fn test_primitive_null_offset_nulls() {

Callers

nothing calls this directly

Calls 4

freezeMethod · 0.80
into_dataMethod · 0.45
sliceMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected