Trait ArrayBuilder

Source
pub trait ArrayBuilder: Send {
Show 13 methods // Required methods fn as_any(&self) -> &dyn Any; fn as_any_mut(&mut self) -> &mut dyn Any; fn dtype(&self) -> &DType; fn len(&self) -> usize; fn append_zeros(&mut self, n: usize); fn append_nulls(&mut self, n: usize); fn extend_from_array(&mut self, array: &dyn Array) -> VortexResult<()>; fn ensure_capacity(&mut self, capacity: usize); fn set_validity(&mut self, validity: Mask); fn finish(&mut self) -> ArrayRef; // Provided methods fn is_empty(&self) -> bool { ... } fn append_zero(&mut self) { ... } fn append_null(&mut self) { ... }
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Source

fn dtype(&self) -> &DType

Source

fn len(&self) -> usize

Source

fn append_zeros(&mut self, n: usize)

Appends n “zero” values to the array.

Source

fn append_nulls(&mut self, n: usize)

Appends n “null” values to the array.

Source

fn extend_from_array(&mut self, array: &dyn Array) -> VortexResult<()>

Extends the array with the provided array, canonicalizing if necessary.

Source

fn ensure_capacity(&mut self, capacity: usize)

Ensure that the builder can hold at least capacity number of items

Source

fn set_validity(&mut self, validity: Mask)

Override builders validity with the one provided

Source

fn finish(&mut self) -> ArrayRef

Constructs an Array from the builder components.

§Panics

This function may panic if the builder’s methods are called with invalid arguments. If only the methods on this interface are used, the builder should not panic. However, specific builders have interfaces that may be misused. For example, if the number of values in a PrimitiveBuilder’s vortex_buffer::BufferMut does not match the number of validity bits, the PrimitiveBuilder’s Self::finish will panic.

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn append_zero(&mut self)

Append a “zero” value to the array.

Source

fn append_null(&mut self)

Append a “null” value to the array.

Implementors§