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>
impl<OffsetSize: OffsetSizeTrait> GenericStringArray<OffsetSize>
Sourcepub const fn get_data_type() -> DataType
👎Deprecated: please use Self::DATA_TYPE
instead
pub const fn get_data_type() -> DataType
Self::DATA_TYPE
insteadGet the data type of the array.
Sourcepub fn num_chars(&self, i: usize) -> usize
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.
Sourcepub fn take_iter<'a>(
&'a self,
indexes: impl Iterator<Item = Option<usize>> + 'a,
) -> impl Iterator<Item = Option<&'a str>>
pub fn take_iter<'a>( &'a self, indexes: impl Iterator<Item = Option<usize>> + 'a, ) -> impl Iterator<Item = Option<&'a str>>
Returns an iterator that returns the values of array.value(i)
for an iterator with each element i
Sourcepub unsafe fn take_iter_unchecked<'a>(
&'a self,
indexes: impl Iterator<Item = Option<usize>> + 'a,
) -> impl Iterator<Item = Option<&'a str>>
pub unsafe fn take_iter_unchecked<'a>( &'a self, indexes: impl Iterator<Item = Option<usize>> + 'a, ) -> impl Iterator<Item = Option<&'a str>>
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()
Sourcepub fn try_from_binary(
v: GenericBinaryArray<OffsetSize>,
) -> Result<Self, ArrowError>
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