Struct arrow::array::GenericListArray [−][src]
pub struct GenericListArray<OffsetSize> { /* fields omitted */ }
Expand description
Generic struct for a primitive Array
For non generic lists, you may wish to consider using ListArray
or LargeListArray
`
Implementations
Returns a clone of the value type of this list.
Returns ith value of this list array.
Safety
Caller must ensure that the index is within the array bounds
Returns the offset values in the offsets buffer
Returns the length for value at index i
.
pub fn iter<'a>(&'a self) -> GenericListArrayIter<'a, OffsetSize>ⓘNotable traits for GenericListArrayIter<'a, S>impl<'a, S: OffsetSizeTrait> Iterator for GenericListArrayIter<'a, S> type Item = Option<ArrayRef>;
pub fn iter<'a>(&'a self) -> GenericListArrayIter<'a, OffsetSize>ⓘNotable traits for GenericListArrayIter<'a, S>impl<'a, S: OffsetSizeTrait> Iterator for GenericListArrayIter<'a, S> type Item = Option<ArrayRef>;
impl<'a, S: OffsetSizeTrait> Iterator for GenericListArrayIter<'a, S> type Item = Option<ArrayRef>;
constructs a new iterator
pub fn from_iter_primitive<T, P, I>(iter: I) -> Self where
T: ArrowPrimitiveType,
P: AsRef<[Option<<T as ArrowPrimitiveType>::Native>]> + IntoIterator<Item = Option<<T as ArrowPrimitiveType>::Native>>,
I: IntoIterator<Item = Option<P>>,
pub fn from_iter_primitive<T, P, I>(iter: I) -> Self where
T: ArrowPrimitiveType,
P: AsRef<[Option<<T as ArrowPrimitiveType>::Native>]> + IntoIterator<Item = Option<<T as ArrowPrimitiveType>::Native>>,
I: IntoIterator<Item = Option<P>>,
Creates a GenericListArray
from an iterator of primitive values
Example
let data = vec![ Some(vec![Some(0), Some(1), Some(2)]), None, Some(vec![Some(3), None, Some(5)]), Some(vec![Some(6), Some(7)]), ]; let list_array = ListArray::from_iter_primitive::<Int32Type, _, _>(data); println!("{:?}", list_array);
Trait Implementations
Returns a reference-counted pointer to the underlying data of this array.
Returns a zero-copy slice of this array with the indicated offset and length. Read more
Returns the offset into the underlying data used by this array(-slice).
Note that the underlying data can be shared by many arrays.
This defaults to 0
. Read more
Returns whether the element at index
is null.
When using this function on a slice, the index is relative to the slice. Read more
Returns whether the element at index
is not null.
When using this function on a slice, the index is relative to the slice. Read more
Returns the total number of null values in this array. Read more
Returns the total number of bytes of memory pointed to by this array. The buffers store bytes in the Arrow memory format, and include the data as well as the validity map. Read more
Returns the total number of bytes of memory occupied physically by this array.
This value will always be greater than returned by get_buffer_memory_size()
and
includes the overhead of the data structures that contain the pointers to the various buffers. Read more
returns two pointers that represent this array in the C Data Interface (FFI)
Performs the conversion.
Performs the conversion.