Skip to main content

ViewBuffer

Struct ViewBuffer 

Source
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

Source

pub fn with_capacity(capacity: usize) -> Self

Create a new ViewBuffer with capacity for the specified number of views

Source

pub fn is_empty(&self) -> bool

Source

pub fn append_block(&mut self, block: Buffer) -> u32

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ViewBuffer

Source§

fn default() -> ViewBuffer

Returns the “default value” for a type. Read more
Source§

impl ValuesBuffer for ViewBuffer

Source§

fn with_capacity(capacity: usize) -> Self

Create a new buffer with capacity for at least capacity elements Read more
Source§

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 more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

§

impl<T> Ungil for T
where T: Send,