use arrow_array::Array;
use arrow_schema::DataType;
pub trait ArrowBinding {
type Builder;
type Array: Array;
const NULLABLE: bool = false;
fn data_type() -> DataType;
fn new_builder(capacity: usize) -> Self::Builder;
#[inline]
fn estimated_bytes_per_value() -> usize {
0
}
fn append_value(b: &mut Self::Builder, v: &Self);
fn append_null(b: &mut Self::Builder);
fn finish(b: Self::Builder) -> Self::Array;
}
#[cfg(feature = "views")]
pub trait ArrowBindingView {
type Array: Array;
type View<'a>
where
Self: 'a;
fn get_view(
array: &Self::Array,
index: usize,
) -> Result<Self::View<'_>, crate::schema::ViewAccessError>;
}
mod binary;
mod column;
mod decimals;
mod dictionary;
mod intervals;
mod lists;
mod map;
mod null_type;
mod option;
mod primitives;
mod record_struct;
mod strings;
mod temporal;
pub use binary::LargeBinary;
pub use column::{ColumnBuilder, data_type_of};
pub use decimals::{Decimal128, Decimal256};
pub use dictionary::{DictKey, Dictionary};
pub use intervals::{IntervalDayTime, IntervalMonthDayNano, IntervalYearMonth};
pub use lists::{FixedSizeList, FixedSizeListNullable, LargeList, List};
pub use map::{Map, OrderedMap};
pub use null_type::Null;
pub use strings::LargeUtf8;
pub use temporal::{
Date32, Date64, Duration, Microsecond, Millisecond, Nanosecond, Second, Time32, Time64,
TimeZoneSpec, Timestamp, TimestampTz, Utc,
};