Trait lance_encoding::decoder::LogicalPageDecoder
source · pub trait LogicalPageDecoder: Send {
// Required methods
fn wait<'a>(
&'a mut self,
num_rows: u32,
source: &'a mut UnboundedReceiver<Box<dyn LogicalPageDecoder>>
) -> BoxFuture<'a, Result<()>>;
fn drain(&mut self, num_rows: u32) -> Result<NextDecodeTask>;
fn unawaited(&self) -> u32;
fn avail(&self) -> u32;
}
Expand description
A decoder for a field’s worth of data
The decoder is initially “unloaded” (doesn’t have all its data). The Self::wait
method should be called to wait for the needed I/O data before attempting to decode
any further.
Unlike the other decoder types it is assumed that LogicalPageDecoder
is stateful
and only Send
. This is why we don’t need a rows_to_skip
argument in Self::drain
Required Methods§
sourcefn wait<'a>(
&'a mut self,
num_rows: u32,
source: &'a mut UnboundedReceiver<Box<dyn LogicalPageDecoder>>
) -> BoxFuture<'a, Result<()>>
fn wait<'a>( &'a mut self, num_rows: u32, source: &'a mut UnboundedReceiver<Box<dyn LogicalPageDecoder>> ) -> BoxFuture<'a, Result<()>>
Waits for enough data to be loaded to decode num_rows
of data
sourcefn drain(&mut self, num_rows: u32) -> Result<NextDecodeTask>
fn drain(&mut self, num_rows: u32) -> Result<NextDecodeTask>
Creates a task to decode num_rows
of data into an array