#thrift #parquet #read #byte #write #reader #async-read

polars-parquet-format

Safe Parquet and Thrift reader and writer (sync and async)

1 unstable release

0.1.0 Oct 27, 2024

#691 in Encoding

Download history 75/week @ 2024-10-21 3067/week @ 2024-10-28 2176/week @ 2024-11-04 5791/week @ 2024-11-11 5021/week @ 2024-11-18 6246/week @ 2024-11-25 8046/week @ 2024-12-02 9202/week @ 2024-12-09 8654/week @ 2024-12-16 8187/week @ 2024-12-23 7655/week @ 2024-12-30 13210/week @ 2025-01-06

38,756 downloads per month
Used in 67 crates (via polars-parquet)

MIT AND Apache-2.0

550KB
13K SLoC

parquet-format-safe

This crate contains an implementation of Thrift and generated Rust code associated to Parquet's thrift definition.

  • supports sync and async read API
  • supports sync and async write API
  • the write API returns the number of written bytes
  • the read API is panic free
  • the read API has a bound on the maximum number of possible bytes read, to avoid OOM.

The Rust generated code is done by a fork of thrift's compiler, available at https://github.com/coastalwhite/thrift/tree/safe.

Usage

To regenerate the thrift format implementation in Rust.

nix-shell
generate_parquet_format
mv parquet.rs src/parquet_format.rs

Dependencies

~230KB