BinaryViewBuilder

Type Alias BinaryViewBuilder 

Source
pub type BinaryViewBuilder = GenericByteViewBuilder<BinaryViewType>;
Expand description

Array builder for BinaryViewArray

Values can be appended using GenericByteViewBuilder::append_value, and nulls with GenericByteViewBuilder::append_null as normal.

§Example

use arrow_array::BinaryViewArray;
let mut builder = BinaryViewBuilder::new();
builder.append_value("hello");
builder.append_null();
builder.append_value("world");
let array = builder.finish();

let expected: Vec<Option<&[u8]>> = vec![Some(b"hello"), None, Some(b"world")];
let actual: Vec<_> = array.iter().collect();
assert_eq!(expected, actual);

Aliased Type§

pub struct BinaryViewBuilder { /* private fields */ }

Trait Implementations§

Source§

impl BinaryLikeArrayBuilder for BinaryViewBuilder

Source§

fn type_name() -> &'static str

Returns a human-readable type name for the builder.
Source§

fn with_capacity(capacity: usize) -> Self

Creates a new builder with the given row capacity.
Source§

fn append_value(&mut self, value: &[u8])

Appends a non-null string value to the builder.
Source§

fn append_null(&mut self)

Appends a null value to the builder.