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§
struct BinaryViewBuilder {
views_builder: BufferBuilder<u128>,
null_buffer_builder: NullBufferBuilder,
completed: Vec<Buffer>,
in_progress: Vec<u8>,
block_size: BlockSizeGrowthStrategy,
string_tracker: Option<(HashTable<usize>, RandomState)>,
phantom: PhantomData<BinaryViewType>,
}
Fields§
§views_builder: BufferBuilder<u128>
§null_buffer_builder: NullBufferBuilder
§completed: Vec<Buffer>
§in_progress: Vec<u8>
§block_size: BlockSizeGrowthStrategy
§string_tracker: Option<(HashTable<usize>, RandomState)>
Some if deduplicating strings
map <string hash> -> <index to the views>
phantom: PhantomData<BinaryViewType>