pub struct RowLayout { /* private fields */ }Expand description
Describes the layout of a row for use with a row collection.
Row layout: [validity_bytes, row_encoded_values]
The validity bytes are just a bitmap padded out to the nearest byte which each bit indicating the corresponding value’s validity.
The row encoded values are just unaligned writes of the value. Varlen data will have a fixed sized prefix/marker written inline, while the rest is written to a heap block somewhere.
Row encoding has no comparison properties.
Implementations§
Source§impl RowLayout
impl RowLayout
pub fn try_new(types: impl IntoIterator<Item = DataType>) -> Result<Self>
pub fn num_columns(&self) -> usize
Sourcepub const fn buffer_size(&self, rows: usize) -> usize
pub const fn buffer_size(&self, rows: usize) -> usize
Returns the buffer size needed to store rows in the encoded row
format.
This includes the width of each value in a row alongside the bytes needed for the validity mask;
Sourcepub fn byte_offset(&self, row: usize, column: usize) -> usize
pub fn byte_offset(&self, row: usize, column: usize) -> usize
Compute the byte offset needed to get a pointer to the colum in the given row.
Sourcepub fn compute_heap_sizes<A>(
&self,
arrays: &[A],
rows: impl IntoExactSizeIterator<Item = usize> + Clone,
sizes: &mut [usize],
) -> Result<()>
pub fn compute_heap_sizes<A>( &self, arrays: &[A], rows: impl IntoExactSizeIterator<Item = usize> + Clone, sizes: &mut [usize], ) -> Result<()>
Computes the heap sizes needed for each row.
All arrays should be provided so that it matches this row layout.
sizes will initially be set to all zeros.
Trait Implementations§
impl Eq for RowLayout
impl StructuralPartialEq for RowLayout
Auto Trait Implementations§
impl Freeze for RowLayout
impl RefUnwindSafe for RowLayout
impl Send for RowLayout
impl Sync for RowLayout
impl Unpin for RowLayout
impl UnsafeUnpin for RowLayout
impl UnwindSafe for RowLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self to key and returns true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.