Crate orc_rust

source
Expand description

A native Rust implementation of the Apache ORC file format, providing API’s to read data into Apache Arrow in-memory arrays.

§Example read usage

let file = File::open("/path/to/file.orc").unwrap();
let reader = ArrowReaderBuilder::try_new(file).unwrap().build();
let record_batches = reader.collect::<Result<Vec<_>, _>>().unwrap();

§Example write usage

let file = File::create("/path/to/file.orc").unwrap();
let batch = get_record_batch();
let mut writer = ArrowWriterBuilder::new(file, batch.schema())
    .try_build()
    .unwrap();
writer.write(&batch).unwrap();
writer.close().unwrap();

See the [datafusion] module for information on how to integrate with Apache DataFusion.

Re-exports§

Modules§