Skip to main content

ValueVector

Struct ValueVector 

Source
pub struct ValueVector {
    pub phys: PhysType,
    pub encoding: VecEncoding,
    pub data: RawBuf,
    pub validity: Option<Bitmap>,
    pub aux: Aux,
    pub len: u32,
}

Fields§

§phys: PhysType§encoding: VecEncoding§data: RawBuf§validity: Option<Bitmap>

Absent means all valid, the common case; kernels skip the AND.

§aux: Aux§len: u32

Implementations§

Source§

impl ValueVector

Source

pub fn flat_from<T: Pod>( arena: &mut MorselArena, phys: PhysType, values: &[T], ) -> Self

Flat vector filled from a slice.

Source

pub fn flat_uninit(arena: &mut MorselArena, phys: PhysType, len: usize) -> Self

Flat vector with room for len values, to be filled by a kernel.

Source

pub fn constant<T: Pod>( arena: &mut MorselArena, phys: PhysType, value: T, len: usize, ) -> Self

Constant vector: one stored value, len logical copies.

Source

pub fn dict_str( arena: &mut MorselArena, codes: &[u16], dict: Arc<Dictionary>, ) -> Self

Dict-encoded string vector: u16 codes into a shared dictionary.

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn values<T: Pod>(&self) -> &[T]

Flat values as a typed slice.

Source

pub fn values_mut<T: Pod>(&mut self) -> &mut [T]

Source

pub fn constant_value<T: Pod>(&self) -> T

The single value of a Constant vector.

Source

pub fn codes_u16(&self) -> &[u16]

Codes of a dict vector (u16 width today; u8/u32 when a writer needs them).

Source

pub fn dictionary(&self) -> &Dictionary

Source

pub fn str_buffers(&self) -> Option<&StrBuffers>

Source

pub fn is_valid(&self, i: usize) -> bool

Row validity, honoring the absent-means-valid convention.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.