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 children data arrays
Returns a reference to the null bitmap of this array data
Returns a reference to the null buffer of this array data.
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.
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:
- Null count is correct
- All offsets are valid
- All String data is valid UTF-8
- All dictionary offsets are valid
Does not (yet) check
- Union type_ids are valid (see https://github.com/apache/arrow-rs/issues/85)
Note calls
validate()
internally
Trait Implementations
Constructs a DictionaryArray
from an array data reference.
Constructs a PrimitiveArray
from an array data reference.
type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for ArrayData
impl UnwindSafe for ArrayData
Blanket Implementations
Mutably borrows from an owned value. Read more