sunchao / parquet-rs

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

Add to_thrift conversion for ColumnChunkMetaData and RowGroupMetaData #131

Closed sadikovi closed 6 years ago

sadikovi commented 6 years ago

This PR adds to_thrift conversion for ColumnChunkMetaData and RowGroupMetaData, both structs already have from_thrift conversion.

I also added builders so metadata can be built outside of metadata.rs - this is used in writer when assembling metadata before converting it to Thrift.

Note that build() methods return Result, from_thrift() methods return Result, but to_thrift() methods return Self directly, because we ensure that metadata is built correctly.

Added a few tests to check the conversion.

sadikovi commented 6 years ago

@sunchao Could you review this PR as well? Thanks!

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 550


Totals Coverage Status
Change from base Build 545: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls
sadikovi commented 6 years ago

@sunchao I updated the code according to your comments. Could you have a look again? Thanks!

sadikovi commented 6 years ago

I updated the code, could you review again? Let me know if there is anything missing!

sunchao commented 6 years ago

Merged. Thanks @sadikovi .

sadikovi commented 6 years ago

Thanks for merging, @sunchao!