pub enum NativeColumn {
Int64 {
data: Vec<i64>,
validity: Vec<u8>,
},
Float64 {
data: Vec<f64>,
validity: Vec<u8>,
},
Bool {
data: Vec<u8>,
validity: Vec<u8>,
},
Bytes {
offsets: Vec<u32>,
values: Vec<u8>,
validity: Vec<u8>,
},
}Expand description
A column as typed buffers (Arrow-compatible), no Value allocations.
Variants§
Int64
Float64
Bool
1 byte per value (0/1).
Bytes
Arrow-style: offsets.len() == n + 1, values[offsets[i]..offsets[i+1]].
Implementations§
Source§impl NativeColumn
impl NativeColumn
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn validity(&self) -> &[u8] ⓘ
pub fn validity(&self) -> &[u8] ⓘ
The null-validity bitmask (bit i set ⇒ row i non-null). All variants
carry one; use validity_bit to test individual positions.
Sourcepub fn validate(&self) -> bool
pub fn validate(&self) -> bool
Verify internal invariants after deserialization (hardening (b)).
Returns false if the column is structurally invalid (e.g. offsets
length mismatch, last offset out of bounds).
Sourcepub fn null_count(&self, n: usize) -> usize
pub fn null_count(&self, n: usize) -> usize
Count null rows in the first n slots. An empty validity bitmap means
every slot is non-null.
Sourcepub fn approx_bytes(&self) -> u64
pub fn approx_bytes(&self) -> u64
Approximate heap size (used to bound the decoded-page cache, Phase 15.4).
Sourcepub fn int64_sequence(start: i64, n: usize) -> Self
pub fn int64_sequence(start: i64, n: usize) -> Self
A fully-non-null Int64 column of n sequential values start..start+n.
Sourcepub fn int64_constant(value: i64, n: usize) -> Self
pub fn int64_constant(value: i64, n: usize) -> Self
A fully-non-null Int64 column filled with value.
Sourcepub fn bool_constant(value: bool, n: usize) -> Self
pub fn bool_constant(value: bool, n: usize) -> Self
A fully-non-null Bool column filled with value.
Sourcepub fn gather(&self, indices: &[usize]) -> NativeColumn
pub fn gather(&self, indices: &[usize]) -> NativeColumn
Gather the values at indices into a new typed column (vectorized scan
merge: pick the visible versions). Skips the Value enum entirely.
Sourcepub fn value_at(&self, idx: usize) -> Option<Value>
pub fn value_at(&self, idx: usize) -> Option<Value>
Typed value at idx as a Value, or None if null / out of range.
Used by the batched row-materialization path (Phase 16.3b) to build only
survivor Rows straight from typed buffers, avoiding the full-column
Vec<Value> decode + per-row .cloned() of the legacy path.
Sourcepub fn slice_range(&self, start: usize, end: usize) -> NativeColumn
pub fn slice_range(&self, start: usize, end: usize) -> NativeColumn
Contiguous slice of rows [start, end) — used to split a column into
fixed-size pages at encode time (cheap memcpy + bitmap rebuild).
Sourcepub fn concat(parts: &[NativeColumn]) -> NativeColumn
pub fn concat(parts: &[NativeColumn]) -> NativeColumn
Concatenate same-typed columns into one — used by the reader to stitch
multi-page columns back into a single NativeColumn.
Trait Implementations§
Source§impl Clone for NativeColumn
impl Clone for NativeColumn
Source§fn clone(&self) -> NativeColumn
fn clone(&self) -> NativeColumn
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeColumn
impl Debug for NativeColumn
Source§impl<'de> Deserialize<'de> for NativeColumn
impl<'de> Deserialize<'de> for NativeColumn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for NativeColumn
impl RefUnwindSafe for NativeColumn
impl Send for NativeColumn
impl Sync for NativeColumn
impl Unpin for NativeColumn
impl UnsafeUnpin for NativeColumn
impl UnwindSafe for NativeColumn
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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