[−][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 |
ArrayDataBuilder | Builder for |
BinaryArray | A special type of |
BinaryBuilder | Array builder for |
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 |
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 |