pub struct LegacyValueVector { /* private fields */ }Expand description
A vector of values of the same physical type. This is the fundamental columnar data unit in Akar’s query execution.
Implementations§
Source§impl LegacyValueVector
impl LegacyValueVector
pub fn new(physical_type: PhysicalTypeID, capacity: usize) -> Self
pub fn physical_type(&self) -> PhysicalTypeID
pub fn size(&self) -> usize
pub fn capacity(&self) -> usize
pub fn is_null(&self, idx: usize) -> bool
pub fn set_null(&mut self, idx: usize, is_null: bool)
pub fn resize(&mut self, new_size: usize)
pub fn data_mut(&mut self) -> &mut [u8] ⓘ
Source§impl LegacyValueVector
impl LegacyValueVector
Sourcepub fn get_double(&self, idx: usize) -> Option<f64>
pub fn get_double(&self, idx: usize) -> Option<f64>
Get an f64 (double) value at index.
Sourcepub fn set_double(&mut self, idx: usize, val: f64)
pub fn set_double(&mut self, idx: usize, val: f64)
Set an f64 (double) value at index.
Source§impl LegacyValueVector
impl LegacyValueVector
Sourcepub fn get_value(&self, idx: usize) -> Option<Value>
pub fn get_value(&self, idx: usize) -> Option<Value>
Get a Value enum from this vector at a given row index. This converts the raw byte buffer into the appropriate Value variant.
Sourcepub fn set_value(&mut self, idx: usize, val: &Value) -> Result<(), String>
pub fn set_value(&mut self, idx: usize, val: &Value) -> Result<(), String>
Set a Value at the given row index.
Converts the Value variant to the vector’s physical type.
Returns an error if the type cannot be converted.
Sourcepub fn push_string(&mut self, val: &str) -> Result<(), String>
pub fn push_string(&mut self, val: &str) -> Result<(), String>
Push a string value (stores as inline bytes for now). Returns an error if the string exceeds the 255-byte inline storage limit.
Sourcepub fn append(&mut self, other: &LegacyValueVector)
pub fn append(&mut self, other: &LegacyValueVector)
Append a value from another vector (for DataChunk operations).
Trait Implementations§
Source§impl Clone for LegacyValueVector
impl Clone for LegacyValueVector
Source§fn clone(&self) -> LegacyValueVector
fn clone(&self) -> LegacyValueVector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LegacyValueVector
impl Debug for LegacyValueVector
Source§impl From<LegacyValueVector> for Vector
impl From<LegacyValueVector> for Vector
Source§fn from(v: ValueVector) -> Self
fn from(v: ValueVector) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LegacyValueVector
impl RefUnwindSafe for LegacyValueVector
impl Send for LegacyValueVector
impl Sync for LegacyValueVector
impl Unpin for LegacyValueVector
impl UnsafeUnpin for LegacyValueVector
impl UnwindSafe for LegacyValueVector
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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