sunchao / parquet-rs

Apache Parquet implementation in Rust
Apache License 2.0
149 stars 20 forks source link

Remove lifetime restriction in file reader #62

Closed sunchao closed 6 years ago

sunchao commented 6 years ago

Currently there's borrowing relation between FileReader and RowGroupReader, due to the sharing of metadata. This restriction is not necessary as row group reader should be allowed to out-live file reader. This removes it by replacing the metadata with RC (reference-counting) values.

sunchao commented 6 years ago

I think this will solve the lifetime issue for the global iterator (since there will no longer be lifetime parameter for RowGroupReader), but haven't tried it yet...

sunchao commented 6 years ago

Merged. Thanks @sadikovi for the review!

sadikovi commented 6 years ago

All good! Great to see this update.