pub struct TermColumn { /* private fields */ }Expand description
One variable’s column: packed TermIds (0 = unbound).
Implementations§
Source§impl TermColumn
impl TermColumn
Sourcepub fn from_terms(
dict: &TermDict,
values: Vec<EncodedTerm>,
) -> Result<Self, ExecError>
pub fn from_terms( dict: &TermDict, values: Vec<EncodedTerm>, ) -> Result<Self, ExecError>
Intern bound terms into dict and store their ids.
Sourcepub fn from_optional_terms(
dict: &TermDict,
values: Vec<Option<EncodedTerm>>,
) -> Result<Self, ExecError>
pub fn from_optional_terms( dict: &TermDict, values: Vec<Option<EncodedTerm>>, ) -> Result<Self, ExecError>
Intern optional terms (None = unbound, stored as 0).
Sourcepub fn any_bound(&self) -> bool
pub fn any_bound(&self) -> bool
Whether any cell is bound (id != 0). Short-circuits at the
first bound cell — the join filter emptiness gates ask exactly
this question and must not pay a full dedupe scan for it.
Column ids are interned by construction, so id != 0 is the
authoritative boundness test; no dict lookup is needed to
confirm it.
Sourcepub fn term_at(&self, dict: &TermDict, row: usize) -> Option<EncodedTerm>
pub fn term_at(&self, dict: &TermDict, row: usize) -> Option<EncodedTerm>
Resolve the encoded term at row (None if unbound).
Sourcepub fn terms(&self, dict: &TermDict) -> Vec<Option<EncodedTerm>>
pub fn terms(&self, dict: &TermDict) -> Vec<Option<EncodedTerm>>
Resolve every cell under one dict lock (None = unbound).
Sourcepub fn gather(&self, indices: &[usize]) -> Self
pub fn gather(&self, indices: &[usize]) -> Self
Gather rows by index into a new column (preserves unbound ids).
Sourcepub fn gather_take(&self, indices: &[u32]) -> Self
pub fn gather_take(&self, indices: &[u32]) -> Self
Gather via u32 row indexes (same as Self::gather, no re-intern).
Unlike a term-level gather, this does not touch the dictionary: the id buffer is remapped by index.
Sourcepub fn gather_take_nullable(&self, indices: &[Option<u32>]) -> Self
pub fn gather_take_nullable(&self, indices: &[Option<u32>]) -> Self
Like Self::gather_take, but null index slots become unbound output rows.
Used by left outer join to attach right-carry columns where unmatched probe rows have a null right index.
Sourcepub fn gather_coalesce(
&self,
left_indices: &[u32],
other: &Self,
right_indices: &[u32],
) -> Result<Self, ExecError>
pub fn gather_coalesce( &self, left_indices: &[u32], other: &Self, right_indices: &[u32], ) -> Result<Self, ExecError>
Coalesce two columns at parallel index arrays: left if bound, else right.
This is the soft-shared gather path after a join: if OPTIONAL left ?x
unbound, take the right’s ?x; if left already bound, keep it.
Soft coalesce is SPARQL compatible mapping on term identity = TermId.
Trait Implementations§
Source§impl Clone for TermColumn
impl Clone for TermColumn
Source§fn clone(&self) -> TermColumn
fn clone(&self) -> TermColumn
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more