Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
StringArray in datafusion::common::arrow::array - Rust
[go: Go Back, main page]

Type Alias StringArray

Source
pub type StringArray = GenericByteArray<GenericStringType<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§

pub struct StringArray { /* private fields */ }