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

Function test_write_bytes

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

Source from the content-addressed store, hash-verified

750
751 #[test]
752 fn test_write_bytes() {
753 let mut builder = GenericBinaryBuilder::<i32>::new();
754 write!(builder, "foo").unwrap();
755 builder.append_value("");
756 writeln!(builder, "bar").unwrap();
757 builder.append_value("");
758 write!(builder, "fiz").unwrap();
759 write!(builder, "buz").unwrap();
760 builder.append_value("");
761 let a = builder.finish();
762 let r: Vec<_> = a.iter().flatten().collect();
763 assert_eq!(
764 r,
765 &["foo".as_bytes(), "bar\n".as_bytes(), "fizbuz".as_bytes()]
766 )
767 }
768
769 #[test]
770 fn test_append_array_without_nulls() {

Callers

nothing calls this directly

Calls 5

collectMethod · 0.80
flattenMethod · 0.80
append_valueMethod · 0.45
finishMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected