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

Function test_string_null_offset_nulls

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

Source from the content-addressed store, hash-verified

243
244#[test]
245fn test_string_null_offset_nulls() {
246 let array = StringArray::from(vec![Some("a"), Some("bc"), None, Some("defh")]);
247 let array = array.into_data().slice(1, 3);
248
249 let arrays = vec![&array];
250
251 let mut mutable = MutableArrayData::new(arrays, true, 0);
252
253 mutable.extend(0, 1, 3);
254 mutable.extend_nulls(1);
255
256 let result = mutable.freeze();
257 let result = StringArray::from(result);
258
259 let expected = StringArray::from(vec![None, Some("defh"), None]);
260 assert_eq!(result, expected);
261}
262
263#[test]
264fn test_bool() {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected