Skip to main content

ArrayDecoder

Trait ArrayDecoder 

Source
pub trait ArrayDecoder: Send {
    // Required method
    fn decode(
        &mut self,
        tape: &Tape<'_>,
        pos: &[u32],
    ) -> Result<ArrayRef, ArrowError>;
}
Expand description

Decodes a column of JSON values from a Tape into an [ArrayRef]

Implement alongside DecoderFactory to override or add support for a type.

Required Methods§

Source

fn decode( &mut self, tape: &Tape<'_>, pos: &[u32], ) -> Result<ArrayRef, ArrowError>

Decode elements from tape starting at the indexes contained in pos

pos contains one tape index per output row, so the returned array must have exactly pos.len() elements and the field’s data type. A row’s value may be TapeElement::Null.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§