Trait lance_encoding::decoder::PageScheduler
source · pub trait PageScheduler: Send + Sync + Debug {
// Required method
fn schedule_ranges(
&self,
ranges: &[Range<u32>],
scheduler: &Arc<dyn EncodingsIo>,
top_level_row: u64
) -> 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_ranges(
&self,
ranges: &[Range<u32>],
scheduler: &Arc<dyn EncodingsIo>,
top_level_row: u64
) -> BoxFuture<'static, Result<Box<dyn PhysicalPageDecoder>>>
fn schedule_ranges( &self, ranges: &[Range<u32>], scheduler: &Arc<dyn EncodingsIo>, top_level_row: u64 ) -> BoxFuture<'static, Result<Box<dyn PhysicalPageDecoder>>>
Schedules a batch of I/O to load the data needed for the requested ranges
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) requested these must be ordered and must not overlapscheduler- a scheduler to submit the I/O request totop_level_row- the row offset of the top level field currently being scheduled. This can be used to assign priority to I/O requests