[][src]Module arrow::array

Defines public types representing Apache Arrow arrays. Arrow's specification defines an array as "a sequence of values with known length all having the same type." For example, the type Int16Array represents an Apache Arrow array of 16-bit integers.

extern crate arrow;

use arrow::array::Int16Array;

// Create a new builder with a capacity of 100
let mut builder = Int16Array::builder(100);

// Append a single primitive value
builder.append_value(1).unwrap();

// Append a null value
builder.append_null().unwrap();

// Append a slice of primitive values
builder.append_slice(&[2, 3, 4]).unwrap();

// Build the array
let array = builder.finish();

assert_eq!(
    5,
    array.len(),
    "The array has 5 values, counting the null value"
);

assert_eq!(2, array.value(2), "Get the value with index 2");

assert_eq!(
    array.value_slice(3, 2),
    &[3, 4],
    "Get slice of len 2 starting at idx 3"
)

Structs

ArrayData

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.

ArrayDataBuilder

Builder for ArrayData type

BinaryArray

A special type of ListArray whose elements are binaries.

BinaryBuilder

Array builder for BinaryArray

BufferBuilder

Buffer builder with zero-copy build method

ListArray

A list array where each element is a variable-sized sequence of values with the same type.

ListBuilder

Array builder for ListArray

PrimitiveArray

Array whose elements are of primitive types.

PrimitiveBuilder

Array builder for fixed-width primitive types

StructArray

A nested array type where each child (called field) is represented by a separate array.

StructBuilder

Array builder for Struct types.

Traits

Array

Trait for dealing with different types of array at runtime when the type of the array is not known in advance

BufferBuilderTrait

Type Definitions

ArrayDataRef
ArrayRef
BooleanArray
BooleanBufferBuilder
BooleanBuilder
Date32BufferBuilder
Date32Builder
Date32Array
Date64BufferBuilder
Date64Builder
Date64Array
Float32BufferBuilder
Float32Builder
Float32Array
Float64BufferBuilder
Float64Builder
Float64Array
Int8BufferBuilder
Int8Builder
Int8Array
Int16BufferBuilder
Int16Builder
Int16Array
Int32BufferBuilder
Int32Builder
Int32Array
Int64BufferBuilder
Int64Builder
Int64Array
Time32SecondBufferBuilder
Time32MillisecondBufferBuilder
Time32SecondBuilder
Time32MillisecondBuilder
Time32SecondArray
Time32MillisecondArray
Time64MicrosecondBufferBuilder
Time64NanosecondBufferBuilder
Time64MicrosecondBuilder
Time64NanosecondBuilder
Time64MicrosecondArray
Time64NanosecondArray
TimestampMicrosecondArray
TimestampMicrosecondBufferBuilder
TimestampMicrosecondBuilder
TimestampMillisecondArray
TimestampMillisecondBufferBuilder
TimestampMillisecondBuilder
TimestampNanosecondArray
TimestampNanosecondBufferBuilder
TimestampNanosecondBuilder
TimestampSecondArray
TimestampSecondBufferBuilder
TimestampSecondBuilder
UInt8BufferBuilder
UInt8Builder
UInt8Array
UInt16BufferBuilder
UInt16Builder
UInt16Array
UInt32BufferBuilder
UInt32Builder
UInt32Array
UInt64BufferBuilder
UInt64Builder
UInt64Array