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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SimpleColumnarData for Bytes

§

type ArrowBuilder = GenericByteBuilder<GenericBinaryType<i32>>

§

type ArrowColumn = GenericByteArray<GenericBinaryType<i32>>

source§

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

source§

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

source§

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

source§

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

source§

impl SimpleColumnarData for String

§

type ArrowBuilder = GenericByteBuilder<GenericStringType<i32>>

§

type ArrowColumn = GenericByteArray<GenericStringType<i32>>

source§

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

source§

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

source§

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

source§

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

source§

impl SimpleColumnarData for Vec<u8>

§

type ArrowBuilder = GenericByteBuilder<GenericBinaryType<i32>>

§

type ArrowColumn = GenericByteArray<GenericBinaryType<i32>>

source§

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

source§

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

source§

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

source§

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

Implementors§