Trait datafusion::datasource::object_store::ObjectReader
source · [−]pub trait ObjectReader: Send + Sync {
fn chunk_reader<'life0, 'async_trait>(
&'life0 self,
start: u64,
length: usize
) -> Pin<Box<dyn Future<Output = Result<Box<dyn AsyncRead>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn sync_chunk_reader(
&self,
start: u64,
length: usize
) -> Result<Box<dyn Read + Send + Sync>>;
fn length(&self) -> u64;
fn sync_reader(&self) -> Result<Box<dyn Read + Send + Sync>> { ... }
}
Expand description
Object Reader for one file in an object store.
Note that the dynamic dispatch on the reader might have some performance impacts.
Required methods
Get reader for a part [start, start + length] in the file asynchronously
Get reader for a part [start, start + length] in the file