pub struct RecordPool {
pub ids: Vec<u64>,
pub columns: Vec<Vec<String>>,
pub n_fields: usize,
}Expand description
Column-major record store: columns[field_idx][record_idx].
All field values are stored as UTF-8 strings in schema field order.
Missing or non-text values become empty strings (treated as
ComparisonLevel::None by every comparator).
The RecordId for record r is ids[r].
Fields§
§ids: Vec<u64>§columns: Vec<Vec<String>>columns[field_idx][record_idx] = UTF-8 text value.
n_fields: usizeImplementations§
Source§impl RecordPool
impl RecordPool
pub fn new(n_fields: usize) -> RecordPool
pub fn from_records(records: &[Record], schema: &Schema) -> RecordPool
Sourcepub fn from_store(
store: &dyn RecordStore,
ids: &[u64],
schema: &Schema,
) -> RecordPool
pub fn from_store( store: &dyn RecordStore, ids: &[u64], schema: &Schema, ) -> RecordPool
Build a pool from a RecordStore, loading only the records with IDs
listed in ids. Records are inserted in ids order; pool position i
corresponds to ids[i].
Sourcepub fn from_pairs(pairs: &[(Record, Record)], schema: &Schema) -> RecordPool
pub fn from_pairs(pairs: &[(Record, Record)], schema: &Schema) -> RecordPool
Build a pool from (Record, Record) pairs: record 2*i is side A of
pair i, record 2*i+1 is side B. Allows compare_batch(&pairs) to
build a pool once and delegate to compare_batch_from_pool.
pub fn with_capacity(cap: usize, n_fields: usize) -> RecordPool
Sourcepub fn push(&mut self, record: &Record, schema: &Schema)
pub fn push(&mut self, record: &Record, schema: &Schema)
Append one record. Fields are stored in schema order.
Sourcepub fn get(&self, field_idx: usize, record_idx: usize) -> &str
pub fn get(&self, field_idx: usize, record_idx: usize) -> &str
Direct column access: bytes of field f for record r.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for RecordPool
impl Clone for RecordPool
Source§fn clone(&self) -> RecordPool
fn clone(&self) -> RecordPool
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RecordPool
impl RefUnwindSafe for RecordPool
impl Send for RecordPool
impl Sync for RecordPool
impl Unpin for RecordPool
impl UnsafeUnpin for RecordPool
impl UnwindSafe for RecordPool
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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