Trait mz_persist_types::columnar::ColumnEncoder

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

    // Required methods
    fn append(&mut self, val: &T);
    fn append_null(&mut self);
    fn finish(self) -> (Self::FinishedColumn, Self::FinishedStats);
}
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.

source

type FinishedStats: DynStats + 'static

Type of statistics 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, Self::FinishedStats)

Finish this encoder, returning an immutable column and statistics.

Implementors§