Skip to main content

ColumnStore

Trait ColumnStore 

Source
pub trait ColumnStore {
    // Required method
    fn query_columnar(
        &self,
        embedding: &[f32],
        k: usize,
        filters: &[ColumnFilter],
    ) -> Result<Vec<Recollection>, MemoryError>;
}
Expand description

Structured columnar predicates fused with vector recall — one method today, but the facet where field enumeration and richer predicates will land (ColumnFilter’s op set is already non_exhaustive).

Required Methods§

Source

fn query_columnar( &self, embedding: &[f32], k: usize, filters: &[ColumnFilter], ) -> Result<Vec<Recollection>, MemoryError>

Vector search fused with structured columnar predicates (ranges and comparisons, not just equality) — the engine behind crate::service::MemoryService::recall_where.

§Absent and null fields

A filter is satisfied only by a fact that HAS the field with a non-null value. A fact missing the field, or storing null in it, is never returned — and ne is no exception, exactly as a SQL comparison against NULL is never true.

field statefield != targetfield == target< <= > >=
absentno matchno matchno match
present, nullno matchno matchno match
present, equalno matchmatchper the comparison
present, differentmatchno matchper the comparison

This is stated because it did not hold: ne on an absent field matched on the native backend and never matched on WASM, for the API’s whole life, because nothing compared them (#1759). Every backend is now held to one shared table — crate::column_filter_conformance — run against both.

Null-ness is not expressible through ColumnFilter; querying for it is what IsNull/IsNotNull are for at the VelesQL layer.

§Errors

Returns MemoryError::InvalidFilter if a filter field is not a plain identifier or a filter value is non-scalar, or MemoryError if the query fails.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ColumnStore for NativeStore

Available on crate feature persistence only.