Type Alias arrow_array::array::BinaryViewArray
source · pub type BinaryViewArray = GenericByteViewArray<BinaryViewType>;
Expand description
A GenericByteViewArray
of [u8]
§Example
use arrow_array::BinaryViewArray;
let array = BinaryViewArray::from_iter_values(vec![b"hello" as &[u8], b"world", b"lulu", b"large payload over 12 bytes"]);
assert_eq!(array.value(0), b"hello");
assert_eq!(array.value(3), b"large payload over 12 bytes");
Aliased Type§
struct BinaryViewArray { /* private fields */ }
Implementations§
source§impl BinaryViewArray
impl BinaryViewArray
sourcepub fn to_string_view(self) -> Result<StringViewArray, ArrowError>
pub fn to_string_view(self) -> Result<StringViewArray, ArrowError>
Convert the BinaryViewArray
to StringViewArray
If items not utf8 data, validate will fail and error returned.
sourcepub unsafe fn to_string_view_unchecked(self) -> StringViewArray
pub unsafe fn to_string_view_unchecked(self) -> StringViewArray
Convert the BinaryViewArray
to StringViewArray
§Safety
Caller is responsible for ensuring that items in array are utf8 data.