ScanStorage

Trait ScanStorage 

Source
pub trait ScanStorage<P>: Send + Sync
where P: Pager<Blob = EntryHandle> + Send + Sync,
{ // Required methods fn table_id(&self) -> TableId; fn field_data_type(&self, fid: LogicalFieldId) -> LlkvResult<DataType>; fn total_rows(&self) -> LlkvResult<u64>; fn all_row_ids(&self) -> LlkvResult<Treemap>; fn prepare_gather_context( &self, logical_fields: &[LogicalFieldId], ) -> LlkvResult<MultiGatherContext>; fn gather_row_window_with_context( &self, logical_fields: &[LogicalFieldId], row_ids: &[u64], null_policy: GatherNullPolicy, ctx: Option<&mut MultiGatherContext>, ) -> LlkvResult<RecordBatch>; fn filter_row_ids<'expr>( &self, filter_expr: &Expr<'expr, FieldId>, ) -> LlkvResult<Treemap>; fn filter_leaf(&self, filter: &OwnedFilter) -> LlkvResult<Treemap>; fn filter_fused( &self, field_id: FieldId, filters: &[OwnedFilter], cache: &PredicateFusionCache, ) -> LlkvResult<RowIdSource>; fn sorted_row_ids_full_table( &self, order_spec: ScanOrderSpec, ) -> LlkvResult<Option<Vec<u64>>>; fn stream_row_ids( &self, chunk_size: usize, on_chunk: &mut dyn FnMut(&[RowId]) -> LlkvResult<()>, ) -> LlkvResult<()>; fn as_any(&self) -> &dyn Any; }
Expand description

Capabilities the scan executor needs from storage.

Required Methods§

Source

fn table_id(&self) -> TableId

Source

fn field_data_type(&self, fid: LogicalFieldId) -> LlkvResult<DataType>

Source

fn total_rows(&self) -> LlkvResult<u64>

Source

fn all_row_ids(&self) -> LlkvResult<Treemap>

Source

fn prepare_gather_context( &self, logical_fields: &[LogicalFieldId], ) -> LlkvResult<MultiGatherContext>

Source

fn gather_row_window_with_context( &self, logical_fields: &[LogicalFieldId], row_ids: &[u64], null_policy: GatherNullPolicy, ctx: Option<&mut MultiGatherContext>, ) -> LlkvResult<RecordBatch>

Source

fn filter_row_ids<'expr>( &self, filter_expr: &Expr<'expr, FieldId>, ) -> LlkvResult<Treemap>

Source

fn filter_leaf(&self, filter: &OwnedFilter) -> LlkvResult<Treemap>

Evaluate a leaf predicate (single column filter) against the storage.

Source

fn filter_fused( &self, field_id: FieldId, filters: &[OwnedFilter], cache: &PredicateFusionCache, ) -> LlkvResult<RowIdSource>

Evaluate fused predicates against a single column.

Source

fn sorted_row_ids_full_table( &self, order_spec: ScanOrderSpec, ) -> LlkvResult<Option<Vec<u64>>>

Optionally return row IDs ordered by a column’s sorted permutation when the caller is scanning the entire table without additional filtering.

Implementations should return Ok(None) when the storage backend cannot satisfy the request for the given ScanOrderSpec.

Source

fn stream_row_ids( &self, chunk_size: usize, on_chunk: &mut dyn FnMut(&[RowId]) -> LlkvResult<()>, ) -> LlkvResult<()>

Source

fn as_any(&self) -> &dyn Any

Implementors§