use arrow::array::{Array, ArrayRef};
use arrow::datatypes::DataType;
use crate::datatype::{
ColumnError, Datatype, RefDatatype, downcast_array, impl_flat_datatype, impl_marker_datatype,
};
impl_flat_datatype!(String, arrow::array::StringArray, &'a str, DataType::Utf8);
pub struct LargeUtf8;
impl_marker_datatype!(
LargeUtf8,
arrow::array::LargeStringArray,
&'a str,
String,
DataType::LargeUtf8
);
impl RefDatatype for String {
type Ref = str;
fn value_ref(typed: &Self::Typed, index: usize) -> &str {
typed.value(index)
}
}
impl RefDatatype for LargeUtf8 {
type Ref = str;
fn value_ref(typed: &Self::Typed, index: usize) -> &str {
typed.value(index)
}
}