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

Function test_variable_sized_nulls

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

Source from the content-addressed store, hash-verified

170/// tests extending from a variable-sized (strings and binary) array w/ offset with nulls
171#[test]
172fn test_variable_sized_nulls() {
173 let array = StringArray::from(vec![Some("a"), Some("bc"), None, Some("defh")]).into_data();
174 let arrays = vec![&array];
175
176 let mut mutable = MutableArrayData::new(arrays, false, 0);
177
178 mutable.extend(0, 1, 3);
179
180 let result = mutable.freeze();
181 let result = StringArray::from(result);
182
183 let expected = StringArray::from(vec![Some("bc"), None]);
184 assert_eq!(result, expected);
185}
186
187/// tests extending from a variable-sized (strings and binary) array
188/// with an offset and nulls

Callers

nothing calls this directly

Calls 3

freezeMethod · 0.80
into_dataMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected