pub trait IndexReader: Send + Sync {
// Required methods
fn read_record_batch<'life0, 'async_trait>(
&'life0 self,
n: u32,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn read_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
range: Range<usize>,
projection: Option<&'life1 [&'life2 str]>,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn num_batches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = u32> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn num_rows(&self) -> usize;
fn schema(&self) -> &Schema;
}
Expand description
Trait for reading an index (or parts of an index) from storage
Required Methods§
Sourcefn read_record_batch<'life0, 'async_trait>(
&'life0 self,
n: u32,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_record_batch<'life0, 'async_trait>(
&'life0 self,
n: u32,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the n-th record batch from the file
Sourcefn read_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
range: Range<usize>,
projection: Option<&'life1 [&'life2 str]>,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn read_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
range: Range<usize>,
projection: Option<&'life1 [&'life2 str]>,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Read the range of rows from the file. If projection is Some, only return the columns in the projection, nested columns like Some(&[“x.y”]) are not supported. If projection is None, return all columns.