pub struct ViewBuffer {
pub views: Vec<u128>,
pub buffers: Vec<Buffer>,
}Expand description
A buffer of view type byte arrays that can be converted into
GenericByteViewArray
Note this does not reuse GenericByteViewBuilder due to the need to call pad_nulls
and reuse the existing logic for Vec in the parquet crate
Fields§
§views: Vec<u128>§buffers: Vec<Buffer>Implementations§
Source§impl ViewBuffer
impl ViewBuffer
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new ViewBuffer with capacity for the specified number of views
pub fn is_empty(&self) -> bool
pub fn append_block(&mut self, block: Buffer) -> u32
Sourcepub fn into_array(
self,
null_buffer: Option<Buffer>,
data_type: &ArrowType,
) -> ArrayRef
pub fn into_array( self, null_buffer: Option<Buffer>, data_type: &ArrowType, ) -> ArrayRef
Converts this into an [ArrayRef] with the provided data_type and null_buffer
Trait Implementations§
Source§impl Debug for ViewBuffer
impl Debug for ViewBuffer
Source§impl Default for ViewBuffer
impl Default for ViewBuffer
Source§fn default() -> ViewBuffer
fn default() -> ViewBuffer
Returns the “default value” for a type. Read more
Source§impl ValuesBuffer for ViewBuffer
impl ValuesBuffer for ViewBuffer
Source§fn with_capacity(capacity: usize) -> Self
fn with_capacity(capacity: usize) -> Self
Create a new buffer with capacity for at least
capacity elements Read moreSource§fn pad_nulls(
&mut self,
read_offset: usize,
values_read: usize,
levels_read: usize,
valid_mask: &[u8],
)
fn pad_nulls( &mut self, read_offset: usize, values_read: usize, levels_read: usize, valid_mask: &[u8], )
If a column contains nulls, more level data may be read than value data, as null
values are not encoded. Therefore, first the levels data is read, the null count
determined, and then the corresponding number of values read to a
ValuesBuffer. Read moreAuto Trait Implementations§
impl Freeze for ViewBuffer
impl RefUnwindSafe for ViewBuffer
impl Send for ViewBuffer
impl Sync for ViewBuffer
impl Unpin for ViewBuffer
impl UnsafeUnpin for ViewBuffer
impl UnwindSafe for ViewBuffer
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
Mutably borrows from an owned value. Read more