Trait mz_persist_types::columnar::ColumnEncoder

source ·
pub trait ColumnEncoder<T> {
    type FinishedColumn: Array + Debug + 'static;

    // Required methods
    fn append(&mut self, val: &T);
    fn append_null(&mut self);
    fn finish(self) -> Self::FinishedColumn;
}
Expand description

An encoder for values of a fixed schema

This allows us to amortize the cost of downcasting columns into concrete types.

Required Associated Types§

source

type FinishedColumn: Array + Debug + 'static

Type of column that this encoder returns when finalized.

Required Methods§

source

fn append(&mut self, val: &T)

Appends val onto this encoder.

source

fn append_null(&mut self)

Appends a null value onto this encoder.

source

fn finish(self) -> Self::FinishedColumn

Finish this encoder, returning an immutable column and statistics.

Implementors§