Trait lance_encoding::decoder::PhysicalPageScheduler
source · pub trait PhysicalPageScheduler: Send + Sync + Debug {
// Required method
fn schedule_range(
&self,
range: Range<u32>,
scheduler: &dyn EncodingsIo
) -> BoxFuture<'static, Result<Box<dyn PhysicalPageDecoder>>>;
}Expand description
A scheduler for single-column encodings of primitive data
The scheduler is responsible for calculating what I/O is needed for the requested rows
Instances should be stateless and Send and Sync. This is because instances can
be shared in follow-up I/O tasks.
See crate::decoder for more information
Required Methods§
sourcefn schedule_range(
&self,
range: Range<u32>,
scheduler: &dyn EncodingsIo
) -> BoxFuture<'static, Result<Box<dyn PhysicalPageDecoder>>>
fn schedule_range( &self, range: Range<u32>, scheduler: &dyn EncodingsIo ) -> BoxFuture<'static, Result<Box<dyn PhysicalPageDecoder>>>
Schedules a batch of I/O to load the data needed for the requested range
Returns a future that will yield a decoder once the data has been loaded
§Arguments
range- the range of row offsets (relative to start of page) requestedscheduler- a scheduler to submit the I/O request to