Struct arrow::array::ArrayData[][src]

pub struct ArrayData { /* fields omitted */ }
Expand description

An generic representation of Arrow array data which encapsulates common attributes and operations for Arrow array. Specific operations for different arrays types (e.g., primitive, list, struct) are implemented in Array.

Implementations

impl ArrayData[src]

pub fn new(
    data_type: DataType,
    len: usize,
    null_count: Option<usize>,
    null_bit_buffer: Option<Buffer>,
    offset: usize,
    buffers: Vec<Buffer>,
    child_data: Vec<ArrayData>
) -> Self
[src]

pub const fn builder(data_type: DataType) -> ArrayDataBuilder[src]

Returns a builder to construct a ArrayData instance.

pub const fn data_type(&self) -> &DataType[src]

Returns a reference to the data type of this array data

pub fn buffers(&self) -> &[Buffer]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns a slice of buffers for this array data

pub fn child_data(&self) -> &[ArrayData]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns a slice of children data arrays

pub fn is_null(&self, i: usize) -> bool[src]

Returns whether the element at index i is null

pub const fn null_bitmap(&self) -> &Option<Bitmap>[src]

Returns a reference to the null bitmap of this array data

pub fn null_buffer(&self) -> Option<&Buffer>[src]

Returns a reference to the null buffer of this array data.

pub fn is_valid(&self, i: usize) -> bool[src]

Returns whether the element at index i is not null

pub const fn len(&self) -> usize[src]

Returns the length (i.e., number of elements) of this array

pub const fn is_empty(&self) -> bool[src]

pub const fn offset(&self) -> usize[src]

Returns the offset of this array

pub const fn null_count(&self) -> usize[src]

Returns the total number of nulls in this array

pub fn get_buffer_memory_size(&self) -> usize[src]

Returns the total number of bytes of memory occupied by the buffers owned by this ArrayData.

pub fn get_array_memory_size(&self) -> usize[src]

Returns the total number of bytes of memory occupied physically by this ArrayData.

pub fn slice(&self, offset: usize, length: usize) -> ArrayData[src]

Creates a zero-copy slice of itself. This creates a new ArrayData with a different offset, len and a shifted null bitmap.

Panics

Panics if offset + length > self.len().

Trait Implementations

impl Clone for ArrayData[src]

fn clone(&self) -> ArrayData[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for ArrayData[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<OffsetSize: BinaryOffsetSizeTrait> From<ArrayData> for GenericBinaryArray<OffsetSize>[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for FixedSizeBinaryArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for UnionArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for NullArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for DecimalArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for BooleanArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl<T: ArrowPrimitiveType> From<ArrayData> for DictionaryArray<T>[src]

Constructs a DictionaryArray from an array data reference.

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl<OffsetSize: OffsetSizeTrait> From<ArrayData> for GenericListArray<OffsetSize>[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for FixedSizeListArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl<T: ArrowPrimitiveType> From<ArrayData> for PrimitiveArray<T>[src]

Constructs a PrimitiveArray from an array data reference.

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl<OffsetSize: StringOffsetSizeTrait> From<ArrayData> for GenericStringArray<OffsetSize>[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl From<ArrayData> for StructArray[src]

fn from(data: ArrayData) -> Self[src]

Performs the conversion.

impl PartialEq<ArrayData> for ArrayData[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl TryFrom<ArrayData> for ArrowArray[src]

type Error = ArrowError

The type returned in the event of a conversion error.

fn try_from(value: ArrayData) -> Result<Self>[src]

Performs the conversion.

impl TryFrom<ArrowArray> for ArrayData[src]

type Error = ArrowError

The type returned in the event of a conversion error.

fn try_from(value: ArrowArray) -> Result<Self>[src]

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V