lance_encoding::encoder

Trait ArrayEncoder

Source
pub trait ArrayEncoder:
    Debug
    + Send
    + Sync {
    // Required method
    fn encode(
        &self,
        data: DataBlock,
        data_type: &DataType,
        buffer_index: &mut u32,
    ) -> Result<EncodedArray>;
}
Expand description

Encodes data from one format to another (hopefully more compact or useful) format

The array encoder must be Send + Sync. Encoding is always done on its own thread task in the background and there could potentially be multiple encode tasks running for a column at once.

Required Methods§

Source

fn encode( &self, data: DataBlock, data_type: &DataType, buffer_index: &mut u32, ) -> Result<EncodedArray>

Encode data

The result should contain a description of the encoding that was chosen. This can be used to decode the data later.

Implementors§