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§
Sourcefn query_columnar(
&self,
embedding: &[f32],
k: usize,
filters: &[ColumnFilter],
) -> Result<Vec<Recollection>, MemoryError>
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 state | field != target | field == target | < <= > >= |
|---|---|---|---|
| absent | no match | no match | no match |
present, null | no match | no match | no match |
| present, equal | no match | match | per the comparison |
| present, different | match | no match | per 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§
impl ColumnStore for NativeStore
persistence only.