Skip to content

Latest commit

 

History

History
84 lines (63 loc) · 3.05 KB

README.md

File metadata and controls

84 lines (63 loc) · 3.05 KB

Apache Parquet Official Native Rust Implementation

Crates.io

This crate contains the official Native Rust implementation of Apache Parquet, which is part of the Apache Arrow project.

Example

Example usage of reading data:

use std::fs::File;
use std::path::Path;
use parquet::file::reader::{FileReader, SerializedFileReader};

let file = File::open(&Path::new("/path/to/file")).unwrap();
let reader = SerializedFileReader::new(file).unwrap();
let mut iter = reader.get_row_iter(None).unwrap();
while let Some(record) = iter.next() {
    println!("{}", record);
}

See crate documentation on available API.

Upgrading from versions prior to 4.0

If you are upgrading from version 3.0 or previous of this crate, you likely need to change your code to use [ConvertedType] rather than [LogicalType] to preserve existing behaviour in your code.

Version 2.4.0 of the Parquet format introduced a LogicalType to replace the existing ConvertedType. This crate used parquet::basic::LogicalType to map to the ConvertedType, but this has been renamed to parquet::basic::ConvertedType from version 4.0 of this crate.

The ConvertedType is deprecated in the format, but is still written to preserve backward compatibility. It is preferred that LogicalType is used, as it supports nanosecond precision timestamps without using the deprecated Int96 Parquet type.

Supported Parquet Version

  • Parquet-format 2.6.0

To update Parquet format to a newer version, check if parquet-format version is available. Then simply update version of parquet-format crate in Cargo.toml.

Features

  • All encodings supported
  • All compression codecs supported
  • Read support
    • Primitive column value readers
    • Row record reader
    • Arrow record reader
  • Statistics support
  • Write support
    • Primitive column value writers
    • Row record writer
    • Arrow record writer
  • Predicate pushdown
  • Parquet format 2.6.0 support

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.