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

Function test_extend

arrow-array/src/builder/generic_bytes_builder.rs:727–734  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

725
726 #[test]
727 fn test_extend() {
728 let mut builder = GenericStringBuilder::<i32>::new();
729 builder.extend(["a", "b", "c", "", "a", "b", "c"].into_iter().map(Some));
730 builder.extend(["d", "cupcakes", "hello"].into_iter().map(Some));
731 let array = builder.finish();
732 assert_eq!(array.value_offsets(), &[0, 1, 2, 3, 3, 4, 5, 6, 7, 15, 20]);
733 assert_eq!(array.value_data(), b"abcabcdcupcakeshello");
734 }
735
736 #[test]
737 fn test_write_str() {

Callers

nothing calls this directly

Calls 3

extendMethod · 0.45
into_iterMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected