#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

#967 in Encoding

Download history 5483/week @ 2024-11-15 5249/week @ 2024-11-22 7913/week @ 2024-11-29 8915/week @ 2024-12-06 8880/week @ 2024-12-13 7448/week @ 2024-12-20 7903/week @ 2024-12-27 10946/week @ 2025-01-03 13821/week @ 2025-01-10 10965/week @ 2025-01-17 11953/week @ 2025-01-24 14027/week @ 2025-01-31 16634/week @ 2025-02-07 14576/week @ 2025-02-14 17806/week @ 2025-02-21 13702/week @ 2025-02-28

65,156 downloads per month
Used in 110 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