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
impl ValueVector
Sourcepub fn with_type(data_type: LogicalType) -> Self
pub fn with_type(data_type: LogicalType) -> Self
Creates a new empty vector with the given type.
Sourcepub fn from_values(values: &[Value]) -> Self
pub fn from_values(values: &[Value]) -> Self
Creates a vector from a slice of values.
Sourcepub fn with_capacity(data_type: LogicalType, capacity: usize) -> Self
pub fn with_capacity(data_type: LogicalType, capacity: usize) -> Self
Creates a new vector with the given capacity.
Sourcepub fn data_type(&self) -> &LogicalType
pub fn data_type(&self) -> &LogicalType
Returns the data type of this vector.
Sourcepub fn push_int64(&mut self, value: i64)
pub fn push_int64(&mut self, value: i64)
Pushes an integer value.
Sourcepub fn push_float64(&mut self, value: f64)
pub fn push_float64(&mut self, value: f64)
Pushes a float value.
Sourcepub fn push_string(&mut self, value: impl Into<ArcStr>)
pub fn push_string(&mut self, value: impl Into<ArcStr>)
Pushes a string value.
Sourcepub fn push_node_id(&mut self, value: NodeId)
pub fn push_node_id(&mut self, value: NodeId)
Pushes a node ID.
Sourcepub fn push_edge_id(&mut self, value: EdgeId)
pub fn push_edge_id(&mut self, value: EdgeId)
Pushes an edge ID.
Sourcepub fn push_value(&mut self, value: Value)
pub fn push_value(&mut self, value: Value)
Pushes a generic value.
Sourcepub fn get_float64(&self, index: usize) -> Option<f64>
pub fn get_float64(&self, index: usize) -> Option<f64>
Gets a float value at index.
Sourcepub fn get_string(&self, index: usize) -> Option<&str>
pub fn get_string(&self, index: usize) -> Option<&str>
Gets a string value at index.
Sourcepub fn get_node_id(&self, index: usize) -> Option<NodeId>
pub fn get_node_id(&self, index: usize) -> Option<NodeId>
Gets a node ID at index.
Sourcepub fn get_edge_id(&self, index: usize) -> Option<EdgeId>
pub fn get_edge_id(&self, index: usize) -> Option<EdgeId>
Gets an edge ID at index.
Sourcepub fn get_value(&self, index: usize) -> Option<Value>
pub fn get_value(&self, index: usize) -> Option<Value>
Gets a value at index as a generic Value.
Sourcepub fn as_bool_slice(&self) -> Option<&[bool]>
pub fn as_bool_slice(&self) -> Option<&[bool]>
Returns a slice of the underlying boolean data.
Sourcepub fn as_int64_slice(&self) -> Option<&[i64]>
pub fn as_int64_slice(&self) -> Option<&[i64]>
Returns a slice of the underlying integer data.
Sourcepub fn as_float64_slice(&self) -> Option<&[f64]>
pub fn as_float64_slice(&self) -> Option<&[f64]>
Returns a slice of the underlying float data.
Sourcepub fn as_node_id_slice(&self) -> Option<&[NodeId]>
pub fn as_node_id_slice(&self) -> Option<&[NodeId]>
Returns a slice of the underlying node ID data.
Sourcepub fn as_edge_id_slice(&self) -> Option<&[EdgeId]>
pub fn as_edge_id_slice(&self) -> Option<&[EdgeId]>
Returns a slice of the underlying edge ID data.
Sourcepub fn logical_type(&self) -> LogicalType
pub fn logical_type(&self) -> LogicalType
Returns the logical type of this vector.
Sourcepub fn copy_row_to(&self, row: usize, dest: &mut ValueVector)
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.
Trait Implementations§
Source§impl Clone for ValueVector
impl Clone for ValueVector
Source§fn clone(&self) -> ValueVector
fn clone(&self) -> ValueVector
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValueVector
impl Debug for ValueVector
Auto Trait Implementations§
impl Freeze for ValueVector
impl RefUnwindSafe for ValueVector
impl Send for ValueVector
impl Sync for ValueVector
impl Unpin for ValueVector
impl UnwindSafe for ValueVector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more