#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

#597 in Encoding

Download history 2427/week @ 2024-10-30 3215/week @ 2024-11-06 6345/week @ 2024-11-13 4531/week @ 2024-11-20 7270/week @ 2024-11-27 9422/week @ 2024-12-04 7986/week @ 2024-12-11 8600/week @ 2024-12-18 8019/week @ 2024-12-25 8486/week @ 2025-01-01 13946/week @ 2025-01-08 11813/week @ 2025-01-15 11851/week @ 2025-01-22 12247/week @ 2025-01-29 16434/week @ 2025-02-05 12510/week @ 2025-02-12

54,758 downloads per month
Used in 92 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