tree: cf8a65524764c7ad7161e06d11265008aadd2112 [path history] [tgz]
  1. .gitignore
  2. Cargo.toml
  3. Dockerfile
  4. README.md
  5. benches/
  6. examples/
  7. src/
rust/README.md

Native Rust implementation of Apache Arrow

Build Status Coverage Status

Status

This is a starting point for a native Rust implementation of Arrow.

The current code demonstrates arrays of primitive types and structs.

Creating an Array from a Vec

// create a memory-aligned Arrow array from an existing Vec
let array = PrimitiveArray::from(vec![1, 2, 3, 4, 5]);

println!("array contents: {:?}", array.iter().collect::<Vec<i32>>());

Creating an Array from a Builder

let mut builder: Builder<i32> = Builder::new();
for i in 0..10 {
    builder.push(i);
}
let buffer = builder.finish();
let array = PrimitiveArray::from(buffer);

println!("array contents: {:?}", array.iter().collect::<Vec<i32>>());

Run Examples

Examples can be run using the cargo run --example command. For example:

cargo run --example array_from_builder

Run Tests

cargo test