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

Create a new ArrayData instance;

If null_count is not specified, the number of nulls in null_bit_buffer is calculated

Safety

The input values must form a valid Arrow array for data_type, or undefined behavior can results.

Note: This is a low level API and most users of the arrow crate should create arrays using the methods in the array module.

Create a new ArrayData, validating that the provided buffers form a valid Arrow array of the specified data type.

If null_count is not specified, the number of nulls in null_bit_buffer is calculated

Note: This is a low level API and most users of the arrow crate should create arrays using the methods in the array module.

Returns a builder to construct a ArrayData instance.

Returns a reference to the data type of this array data

Returns a slice of buffers for this array data

Returns a slice of children data arrays

Returns whether the element at index i is null

Returns a reference to the null bitmap of this array data

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

Returns whether the element at index i is not null

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

Returns the offset of this array

Returns the total number of nulls in this array

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

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

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().

Returns a new empty ArrayData valid for data_type.

“cheap” validation of an ArrayData. Ensures buffers are sufficiently sized to store len + offset total elements of data_type and performs other inexpensive consistency checks.

This check is “cheap” in the sense that it does not validate the contents of the buffers (e.g. that all offsets for UTF8 arrays are within the bounds of the values buffer).

See [validate_full] to validate fully the offset content and the validitiy of utf8 data

“expensive” validation that ensures:

  1. Null count is correct
  2. All offsets are valid
  3. All String data is valid UTF-8
  4. All dictionary offsets are valid

Does not (yet) check

  1. Union type_ids are valid (see https://github.com/apache/arrow-rs/issues/85) Note calls validate() internally

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Constructs a DictionaryArray from an array data reference.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Constructs a PrimitiveArray from an array data reference.

Performs the conversion.

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

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.