arrow_array::array

Type Alias StringViewArray

Source
pub type StringViewArray = GenericByteViewArray<StringViewType>;
Expand description

A GenericByteViewArray that stores utf8 data

See GenericByteViewArray for format and layout details.

§Example

use arrow_array::StringViewArray;
let array = StringViewArray::from_iter_values(vec!["hello", "world", "lulu", "large payload over 12 bytes"]);
assert_eq!(array.value(0), "hello");
assert_eq!(array.value(3), "large payload over 12 bytes");

Aliased Type§

struct StringViewArray {
    data_type: DataType,
    views: ScalarBuffer<u128>,
    buffers: Vec<Buffer>,
    phantom: PhantomData<StringViewType>,
    nulls: Option<NullBuffer>,
}

Fields§

§data_type: DataType§views: ScalarBuffer<u128>§buffers: Vec<Buffer>§phantom: PhantomData<StringViewType>§nulls: Option<NullBuffer>

Implementations§

Source§

impl StringViewArray

Source

pub fn to_binary_view(self) -> BinaryViewArray

Source

pub fn is_ascii(&self) -> bool

Returns true if all data within this array is ASCII

Trait Implementations§

Source§

impl From<Vec<&str>> for StringViewArray

Source§

fn from(v: Vec<&str>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Option<&str>>> for StringViewArray

Source§

fn from(v: Vec<Option<&str>>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Option<String>>> for StringViewArray

Source§

fn from(v: Vec<Option<String>>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<String>> for StringViewArray

Source§

fn from(v: Vec<String>) -> Self

Converts to this type from the input type.
Source§

impl<'a> StringArrayType<'a> for &'a StringViewArray

Source§

fn is_ascii(&self) -> bool

Returns true if all data within this string array is ASCII
Source§

fn iter(&self) -> ArrayIter<Self>

Constructs a new iterator