#orc #analytics #read #apache #rle #decode #metadata

orc-format

Unofficial implementation of Apache ORC spec in safe Rust

4 releases (2 breaking)

0.3.0 Jul 30, 2022
0.2.0 Jul 28, 2022
0.1.1 Jul 20, 2022
0.1.0 Jul 19, 2022

#1438 in Encoding

Download history 23/week @ 2024-05-22 30/week @ 2024-05-29 278/week @ 2024-06-05 483/week @ 2024-06-12 217/week @ 2024-06-19 381/week @ 2024-06-26 260/week @ 2024-07-03 308/week @ 2024-07-10 579/week @ 2024-07-17 591/week @ 2024-07-24 419/week @ 2024-07-31 694/week @ 2024-08-07 542/week @ 2024-08-14 654/week @ 2024-08-21 370/week @ 2024-08-28 371/week @ 2024-09-04

2,091 downloads per month
Used in 2 crates

MIT/Apache

62KB
1.5K SLoC

Read Apache ORC from Rust

test codecov

Read Apache ORC in Rust.

This repository is similar to parquet2 and Avro-schema, providing a toolkit to:

  • Read ORC files (proto structures)
  • Read stripes (the conversion from proto metadata to memory regions)
  • Decode stripes (the math of decode stripes into e.g. booleans, runs of RLE, etc.)

It currently reads the following (logical) types:

  • booleans
  • strings
  • integers
  • floats

What is not yet implemented:

  • Snappy, LZO decompression
  • RLE v2 Patched Base decoding
  • RLE v1 decoding
  • Utility functions to decode non-native logical types:
    • decimal
    • timestamp
    • struct
    • List
    • Union

Run tests

python3 -m venv venv
venv/bin/pip install -U pip
venv/bin/pip install -U pyorc
venv/bin/python write.py
cargo test

Dependencies

~2.5MB
~58K SLoC