Type Alias arrow_array::array::GenericStringArray

source ·
pub type GenericStringArray<OffsetSize> = GenericByteArray<GenericStringType<OffsetSize>>;
Expand description

A GenericByteArray for storing str

Aliased Type§

struct GenericStringArray<OffsetSize> { /* private fields */ }

Implementations§

source§

impl<OffsetSize: OffsetSizeTrait> GenericStringArray<OffsetSize>

source

pub const fn get_data_type() -> DataType

👎Deprecated: please use Self::DATA_TYPE instead

Get the data type of the array.

source

pub fn num_chars(&self, i: usize) -> usize

Returns the number of Unicode Scalar Value in the string at index i.

§Performance

This function has O(n) time complexity where n is the string length. If you can make sure that all chars in the string are in the range U+0x0000 ~ U+0x007F, please use the function value_length which has O(1) time complexity.

source

pub fn take_iter<'a>( &'a self, indexes: impl Iterator<Item = Option<usize>> + 'a, ) -> impl Iterator<Item = Option<&str>> + 'a

Returns an iterator that returns the values of array.value(i) for an iterator with each element i

source

pub unsafe fn take_iter_unchecked<'a>( &'a self, indexes: impl Iterator<Item = Option<usize>> + 'a, ) -> impl Iterator<Item = Option<&str>> + 'a

Returns an iterator that returns the values of array.value(i) for an iterator with each element i

§Safety

caller must ensure that the indexes in the iterator are less than the array.len()

source

pub fn try_from_binary( v: GenericBinaryArray<OffsetSize>, ) -> Result<Self, ArrowError>

Fallibly creates a GenericStringArray from a GenericBinaryArray returning an error if GenericBinaryArray contains invalid UTF-8 data

Trait Implementations§

source§

impl<OffsetSize: OffsetSizeTrait> From<GenericByteArray<GenericBinaryType<OffsetSize>>> for GenericStringArray<OffsetSize>

source§

fn from(v: GenericBinaryArray<OffsetSize>) -> Self

Converts to this type from the input type.
source§

impl<OffsetSize: OffsetSizeTrait> From<GenericListArray<OffsetSize>> for GenericStringArray<OffsetSize>

source§

fn from(v: GenericListArray<OffsetSize>) -> Self

Converts to this type from the input type.
source§

impl<OffsetSize: OffsetSizeTrait> From<Vec<&str>> for GenericStringArray<OffsetSize>

source§

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

Converts to this type from the input type.
source§

impl<OffsetSize: OffsetSizeTrait> From<Vec<Option<&str>>> for GenericStringArray<OffsetSize>

source§

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

Converts to this type from the input type.
source§

impl<OffsetSize: OffsetSizeTrait> From<Vec<Option<String>>> for GenericStringArray<OffsetSize>

source§

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

Converts to this type from the input type.
source§

impl<OffsetSize: OffsetSizeTrait> From<Vec<String>> for GenericStringArray<OffsetSize>

source§

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

Converts to this type from the input type.
source§

impl<OffsetSize: OffsetSizeTrait> PartialEq for GenericStringArray<OffsetSize>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.