mz_persist_types::codec_impls

Trait SimpleColumnarData

Source
pub trait SimpleColumnarData {
    type ArrowBuilder: ArrayBuilder + Default;
    type ArrowColumn: Array + Clone + 'static;

    // Required methods
    fn goodbytes(builder: &Self::ArrowBuilder) -> usize;
    fn push(&self, builder: &mut Self::ArrowBuilder);
    fn push_null(builder: &mut Self::ArrowBuilder);
    fn read(&mut self, idx: usize, column: &Self::ArrowColumn);
}
Expand description

Simple type of data that can be columnar encoded.

Required Associated Types§

Source

type ArrowBuilder: ArrayBuilder + Default

Type of arrow builder that we encode data into.

Source

type ArrowColumn: Array + Clone + 'static

Type of arrow array the we decode data from.

Required Methods§

Source

fn goodbytes(builder: &Self::ArrowBuilder) -> usize

The number of actual data bytes this item represents.

Source

fn push(&self, builder: &mut Self::ArrowBuilder)

Encode self into builder.

Source

fn push_null(builder: &mut Self::ArrowBuilder)

Encode a null value into builder.

Source

fn read(&mut self, idx: usize, column: &Self::ArrowColumn)

Decode an instance of self from column.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SimpleColumnarData for String

Source§

impl SimpleColumnarData for Vec<u8>

Implementors§