Type Alias arrow_array::array::StringArray

source ·
pub type StringArray = GenericStringArray<i32>;
Expand description

A GenericStringArray of str using i32 offsets

§Examples

Construction

// Create from Vec<Option<&str>>
let arr = StringArray::from(vec![Some("foo"), Some("bar"), None, Some("baz")]);
// Create from Vec<&str>
let arr = StringArray::from(vec!["foo", "bar", "baz"]);
// Create from iter/collect (requires Option<&str>)
let arr: StringArray = std::iter::repeat(Some("foo")).take(10).collect();

Construction and Access

let array = StringArray::from(vec![Some("foo"), None, Some("bar")]);
assert_eq!(array.value(0), "foo");

See GenericByteArray for more information and examples

Aliased Type§

struct StringArray { /* private fields */ }