pub trait ScalarIndex:
Send
+ Sync
+ Debug
+ Index
+ DeepSizeOf {
// Required methods
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 dyn AnyQuery,
) -> Pin<Box<dyn Future<Output = Result<RowIdTreeMap>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load<'async_trait>(
store: Arc<dyn IndexStore>,
) -> Pin<Box<dyn Future<Output = Result<Arc<Self>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait;
fn remap<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mapping: &'life1 HashMap<u64, Option<u64>>,
dest_store: &'life2 dyn IndexStore,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
new_data: SendableRecordBatchStream,
dest_store: &'life1 dyn IndexStore,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A trait for a scalar index, a structure that can determine row ids that satisfy scalar queries
Required Methods§
Sourcefn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 dyn AnyQuery,
) -> Pin<Box<dyn Future<Output = Result<RowIdTreeMap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 dyn AnyQuery,
) -> Pin<Box<dyn Future<Output = Result<RowIdTreeMap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search the scalar index
Returns all row ids that satisfy the query, these row ids are not necessarily ordered
Sourcefn load<'async_trait>(
store: Arc<dyn IndexStore>,
) -> Pin<Box<dyn Future<Output = Result<Arc<Self>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn load<'async_trait>(
store: Arc<dyn IndexStore>,
) -> Pin<Box<dyn Future<Output = Result<Arc<Self>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
Load the scalar index from storage
Sourcefn remap<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mapping: &'life1 HashMap<u64, Option<u64>>,
dest_store: &'life2 dyn IndexStore,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remap<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mapping: &'life1 HashMap<u64, Option<u64>>,
dest_store: &'life2 dyn IndexStore,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remap the row ids, creating a new remapped version of this index in dest_store
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
new_data: SendableRecordBatchStream,
dest_store: &'life1 dyn IndexStore,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
new_data: SendableRecordBatchStream,
dest_store: &'life1 dyn IndexStore,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Add the new data into the index, creating an updated version of the index in dest_store