sunchao / parquet-rs

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

Patch schema to handle root node repetition and num_children as 0 #182

Closed sadikovi closed 5 years ago

sadikovi commented 5 years ago

This PR adds workarounds for some of the parquet-cpp files that have repetition level set for schema root node and primitive fields having 0 as number of children.

Neither of the aforementioned behaviours is part of the format definition, but we need to handle them in order to read files. So I simply added Some(0) in addition to None for primitive fields and reset of the repetition type on the root node.

Relates to #178.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 646


Files with Coverage Reduction New Missed Lines %
encodings/encoding.rs 1 94.77%
schema/types.rs 12 96.43%
<!-- Total: 13 -->
Totals Coverage Status
Change from base Build 640: 0.007%
Covered Lines: 12429
Relevant Lines: 13012

💛 - Coveralls
sunchao commented 5 years ago

Merged. Thanks @sadikovi !

sadikovi commented 5 years ago

Thanks!