pub struct ArrayVector<'a> { /* private fields */ }Expand description
A fixed-size list vector borrowed from a
DataChunkHandle.
Exposes a fixed-width list whose child storage is contiguous across all rows.
Implementations§
Source§impl<'a> ArrayVector<'a>
impl<'a> ArrayVector<'a>
Sourcepub fn logical_type(&self) -> LogicalTypeHandle
pub fn logical_type(&self) -> LogicalTypeHandle
Get the logical type of this ArrayVector.
Sourcepub fn get_array_size(&self) -> u64
pub fn get_array_size(&self) -> u64
Returns the size of the array type.
Sourcepub fn row_is_null(&self, row: u64) -> bool
pub fn row_is_null(&self, row: u64) -> bool
Returns true if the row at the given index is null.
§Panics
Panics if row is outside the vector capacity.
Sourcepub fn try_row_is_null(&self, row: u64) -> Result<bool>
pub fn try_row_is_null(&self, row: u64) -> Result<bool>
Returns whether the row is null, or an error if it is out of range.
Sourcepub fn child(&self, capacity: usize) -> FlatVector<'a>
pub fn child(&self, capacity: usize) -> FlatVector<'a>
Returns the child vector. capacity should be a multiple of the array size.
§Panics
Panics if capacity is not a multiple of the fixed array size or exceeds
the child allocation derived from the parent capacity.
Sourcepub unsafe fn set_child<T: Copy>(&self, data: &[T])
pub unsafe fn set_child<T: Copy>(&self, data: &[T])
Set primitive data to the child node.
§Panics
Panics if data.len() is not a multiple of the fixed array size.
§Safety
The caller must ensure T matches the child vector’s physical storage
and no other references to the same storage exist during the copy. The
caller must also ensure the child backing allocation has space for all
data elements; nested callers can arrange this by reserving capacity
on the parent list vector before taking the array child.