arrow_array::array::primitive_array

Type Alias UInt8Array

Source
pub type UInt8Array = PrimitiveArray<UInt8Type>;
Expand description

A PrimitiveArray of u8

§Examples

Construction

// Create from Vec<Option<u8>>
let arr = UInt8Array::from(vec![Some(1), None, Some(2)]);
// Create from Vec<u8>
let arr = UInt8Array::from(vec![1, 2, 3]);
// Create iter/collect
let arr: UInt8Array = std::iter::repeat(42).take(10).collect();

See PrimitiveArray for more information and examples

Aliased Type§

struct UInt8Array {
    data_type: DataType,
    values: ScalarBuffer<u8>,
    nulls: Option<NullBuffer>,
}

Fields§

§data_type: DataType§values: ScalarBuffer<u8>

Values data

§nulls: Option<NullBuffer>