[][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 type of ListArray whose elements are binaries.

BinaryBuilder

Array builder for BinaryArray

BufferBuilder

Buffer builder with zero-copy build method

FixedSizeBinaryArray

A type of FixedSizeListArray whose elements are binaries.

FixedSizeBinaryBuilder
FixedSizeListArray

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

FixedSizeListBuilder

Array builder for ListArray

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

StringArray

A type of ListArray whose elements are UTF8 strings.

StringBuilder
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

ArrayBuilder

Trait for dealing with different array builders at runtime

ArrayEqual

Trait for Array equality.

BufferBuilderTrait
JsonEqual

Trait for comparing arrow array with json array

ListArrayOps

Common operations for List types, currently ListArray, FixedSizeListArray and BinaryArray.

PrimitiveArrayOps

Common operations for primitive types, including numeric types and boolean type.

Type Definitions

ArrayDataRef
ArrayRef
BooleanArray
BooleanBufferBuilder
BooleanBuilder
Date32Array
Date32BufferBuilder
Date32Builder
Date64Array
Date64BufferBuilder
Date64Builder
DurationMicrosecondArray
DurationMicrosecondBufferBuilder
DurationMicrosecondBuilder
DurationMillisecondArray
DurationMillisecondBufferBuilder
DurationMillisecondBuilder
DurationNanosecondArray
DurationNanosecondBufferBuilder
DurationNanosecondBuilder
DurationSecondArray
DurationSecondBufferBuilder
DurationSecondBuilder
Float32Array
Float32BufferBuilder
Float32Builder
Float64Array
Float64BufferBuilder
Float64Builder
Int8Array
Int8BufferBuilder
Int8Builder
Int16Array
Int16BufferBuilder
Int16Builder
Int32Array
Int32BufferBuilder
Int32Builder
Int64Array
Int64BufferBuilder
Int64Builder
IntervalDayTimeArray
IntervalDayTimeBufferBuilder
IntervalDayTimeBuilder
IntervalYearMonthArray
IntervalYearMonthBufferBuilder
IntervalYearMonthBuilder
Time32SecondArray
Time32MillisecondArray
Time32SecondBufferBuilder
Time32MillisecondBufferBuilder
Time32SecondBuilder
Time32MillisecondBuilder
Time64MicrosecondArray
Time64NanosecondArray
Time64MicrosecondBufferBuilder
Time64NanosecondBufferBuilder
Time64MicrosecondBuilder
Time64NanosecondBuilder
TimestampMicrosecondArray
TimestampMicrosecondBufferBuilder
TimestampMicrosecondBuilder
TimestampMillisecondArray
TimestampMillisecondBufferBuilder
TimestampMillisecondBuilder
TimestampNanosecondArray
TimestampNanosecondBufferBuilder
TimestampNanosecondBuilder
TimestampSecondArray
TimestampSecondBufferBuilder
TimestampSecondBuilder
UInt8Array
UInt8BufferBuilder
UInt8Builder
UInt16Array
UInt16BufferBuilder
UInt16Builder
UInt32Array
UInt32BufferBuilder
UInt32Builder
UInt64Array
UInt64BufferBuilder
UInt64Builder