sunchao / parquet-rs

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

Fix written rows metric in column writer #150

Closed sadikovi closed 6 years ago

sadikovi commented 6 years ago

This PR addresses a problem in column writer when writing nullable non-repeated values. In this case the number of rows is the number of definition levels (at most number of values), but we were passing the actual number of values to write.

I also removed if statements in the loops in the hopes of improving performance.

Added test that verifies the correctness of the fix.

sadikovi commented 6 years ago

@sunchao Can you review this PR? Thanks!

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 593


Files with Coverage Reduction New Missed Lines %
encodings/encoding.rs 1 94.82%
data_type.rs 1 93.09%
column/writer.rs 9 94.71%
<!-- Total: 11 -->
Totals Coverage Status
Change from base Build 591: -0.01%
Covered Lines: 11967
Relevant Lines: 12530

💛 - Coveralls