1
2
3
4
5
6
7
8
9
10
11
12
13
14
use arrow_array::builder::ArrayBuilder;
use arrow_schema::DataType;

pub trait ToArrow {
    type Item;
    type Builder: ArrowBuilder<Self::Item> + ArrayBuilder;

    fn to_datatype() -> DataType;
}

pub trait ArrowBuilder<T> {
    fn new_with_capacity(capacity: usize) -> Self;
    fn append(&mut self, value: Option<T>);
}