Skip to main content

ValueVector

Struct ValueVector 

Source
pub struct ValueVector { /* private fields */ }
Expand description

A columnar vector of values.

ValueVector stores data in columnar format for efficient SIMD processing and cache utilization during query execution.

Implementations§

Source§

impl ValueVector

Source

pub fn new() -> Self

Creates a new empty generic vector.

Source

pub fn with_type(data_type: LogicalType) -> Self

Creates a new empty vector with the given type.

Source

pub fn from_values(values: &[Value]) -> Self

Creates a vector from a slice of values.

Source

pub fn with_capacity(data_type: LogicalType, capacity: usize) -> Self

Creates a new vector with the given capacity.

Source

pub fn data_type(&self) -> &LogicalType

Returns the data type of this vector.

Source

pub fn len(&self) -> usize

Returns the number of entries in this vector.

Source

pub fn is_empty(&self) -> bool

Returns true if this vector is empty.

Source

pub fn is_null(&self, index: usize) -> bool

Returns true if the value at index is null.

Source

pub fn set_null(&mut self, index: usize)

Sets the value at index to null.

Source

pub fn push_bool(&mut self, value: bool)

Pushes a boolean value.

Source

pub fn push_int64(&mut self, value: i64)

Pushes an integer value.

Source

pub fn push_float64(&mut self, value: f64)

Pushes a float value.

Source

pub fn push_string(&mut self, value: impl Into<Arc<str>>)

Pushes a string value.

Source

pub fn push_node_id(&mut self, value: NodeId)

Pushes a node ID.

Source

pub fn push_edge_id(&mut self, value: EdgeId)

Pushes an edge ID.

Source

pub fn push_value(&mut self, value: Value)

Pushes a generic value.

Source

pub fn get_bool(&self, index: usize) -> Option<bool>

Gets a boolean value at index.

Source

pub fn get_int64(&self, index: usize) -> Option<i64>

Gets an integer value at index.

Source

pub fn get_float64(&self, index: usize) -> Option<f64>

Gets a float value at index.

Source

pub fn get_string(&self, index: usize) -> Option<&str>

Gets a string value at index.

Source

pub fn get_node_id(&self, index: usize) -> Option<NodeId>

Gets a node ID at index.

Source

pub fn get_edge_id(&self, index: usize) -> Option<EdgeId>

Gets an edge ID at index.

Source

pub fn get_value(&self, index: usize) -> Option<Value>

Gets a value at index as a generic Value.

Source

pub fn get(&self, index: usize) -> Option<Value>

Alias for get_value.

Source

pub fn push(&mut self, value: Value)

Alias for push_value.

Source

pub fn as_bool_slice(&self) -> Option<&[bool]>

Returns a slice of the underlying boolean data.

Source

pub fn as_int64_slice(&self) -> Option<&[i64]>

Returns a slice of the underlying integer data.

Source

pub fn as_float64_slice(&self) -> Option<&[f64]>

Returns a slice of the underlying float data.

Source

pub fn as_node_id_slice(&self) -> Option<&[NodeId]>

Returns a slice of the underlying node ID data.

Source

pub fn as_edge_id_slice(&self) -> Option<&[EdgeId]>

Returns a slice of the underlying edge ID data.

Source

pub fn logical_type(&self) -> LogicalType

Returns the logical type of this vector.

Source

pub fn copy_row_to(&self, row: usize, dest: &mut ValueVector)

Copies a row from this vector to the destination vector.

The destination vector should have a compatible type. The value at row is read from this vector and pushed to the destination vector.

Source

pub fn clear(&mut self)

Clears all data from this vector.

Trait Implementations§

Source§

impl Clone for ValueVector

Source§

fn clone(&self) -> ValueVector

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValueVector

Source§

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

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

impl Default for ValueVector

Source§

fn default() -> Self

Returns the “default value” for a type. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.