pub type BinaryViewArray = GenericByteViewArray<BinaryViewType>;
Expand description
A GenericByteViewArray
of [u8]
See GenericByteViewArray
for format and layout details.
§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 {
data_type: DataType,
views: ScalarBuffer<u128>,
buffers: Vec<Buffer>,
phantom: PhantomData<BinaryViewType>,
nulls: Option<NullBuffer>,
}
Fields§
§data_type: DataType
§views: ScalarBuffer<u128>
§buffers: Vec<Buffer>
§phantom: PhantomData<BinaryViewType>
§nulls: Option<NullBuffer>
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.