ArrayBatchDecoder

Trait ArrayBatchDecoder 

Source
pub trait ArrayBatchDecoder: Send {
    // Required methods
    fn next_batch(
        &mut self,
        batch_size: usize,
        parent_present: Option<&NullBuffer>,
    ) -> Result<ArrayRef>;
    fn skip_values(
        &mut self,
        n: usize,
        parent_present: Option<&NullBuffer>,
    ) -> Result<()>;
}

Required Methods§

Source

fn next_batch( &mut self, batch_size: usize, parent_present: Option<&NullBuffer>, ) -> Result<ArrayRef>

Used as base for decoding ORC columns into Arrow arrays. Provide an input batch_size which specifies the upper limit of the number of values returned in the output array.

If parent nested type (e.g. Struct) indicates a null in it’s PRESENT stream, then the child doesn’t have a value (similar to other nullability). So we need to take care to insert these null values as Arrow requires the child to hold data in the null slot of the child.

Source

fn skip_values( &mut self, n: usize, parent_present: Option<&NullBuffer>, ) -> Result<()>

Skip the next n values without decoding them, failing if it cannot skip the enough values. If parent nested type (e.g. Struct) indicates a null in it’s PRESENT stream, then the child doesn’t have a value (similar to other nullability). So we need to take care to insert these null values as Arrow requires the child to hold data in the null slot of the child.

Implementors§