Struct lance_encoding::encodings::logical::struct::SimpleStructScheduler
source · pub struct SimpleStructScheduler { /* private fields */ }
Expand description
A scheduler for structs
The implementation is actually a bit more tricky than one might initially think. We can’t just go through and schedule each column one after the other. This would mean our decode can’t start until nearly all the data has arrived (since we need data from each column)
Instead, we schedule in row-major fashion, described in detail below.
Note: this scheduler is the starting point for all decoding. This is because we treat the top-level record batch as a non-nullable struct.
This means this scheduler has to deal with u64 indices / ranges because the top-level scheduler spans up to u64 rows.
Implementations§
source§impl SimpleStructScheduler
impl SimpleStructScheduler
pub fn new( children: Vec<Vec<Arc<dyn LogicalPageScheduler>>>, child_fields: Fields ) -> Self
pub fn new_root( children: Vec<Vec<Arc<dyn LogicalPageScheduler>>>, child_fields: Fields ) -> Self
pub fn new_root_decoder_ranges( &self, ranges: &[Range<u64>] ) -> SimpleStructDecoder
pub fn new_root_decoder_indices(&self, indices: &[u64]) -> SimpleStructDecoder
pub fn schedule_ranges_u64( &self, ranges: &[Range<u64>], context: &mut SchedulerContext, top_level_row: u64 ) -> Result<()>
pub fn schedule_take_u64( &self, indices: &[u64], context: &mut SchedulerContext, top_level_row: u64 ) -> Result<()>
Trait Implementations§
source§impl Debug for SimpleStructScheduler
impl Debug for SimpleStructScheduler
source§impl LogicalPageScheduler for SimpleStructScheduler
impl LogicalPageScheduler for SimpleStructScheduler
source§fn schedule_ranges(
&self,
ranges: &[Range<u32>],
context: &mut SchedulerContext,
top_level_row: u64
) -> Result<()>
fn schedule_ranges( &self, ranges: &[Range<u32>], context: &mut SchedulerContext, top_level_row: u64 ) -> Result<()>
Schedules I/O for the requested portions of the page. Read more
source§fn schedule_take(
&self,
indices: &[u32],
context: &mut SchedulerContext,
top_level_row: u64
) -> Result<()>
fn schedule_take( &self, indices: &[u32], context: &mut SchedulerContext, top_level_row: u64 ) -> Result<()>
Schedules I/O for the requested rows (identified by row offsets from start of page)
TODO: implement this using schedule_ranges
Auto Trait Implementations§
impl Freeze for SimpleStructScheduler
impl !RefUnwindSafe for SimpleStructScheduler
impl Send for SimpleStructScheduler
impl Sync for SimpleStructScheduler
impl Unpin for SimpleStructScheduler
impl !UnwindSafe for SimpleStructScheduler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more