sunchao / parquet-rs

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

DeltaByteArrayEncoder::flush_buffer() should reset previous byte array #132

Closed sunchao closed 6 years ago

sunchao commented 6 years ago

If flush_buffer() doesn't reset the previous vector, the first prefix len the encoder write in the next put() call will potentially be positive. However, in set_data() DeltaByteArrayDecoder will clear previous_value, and therefore IndexOutOfBound will occur if we try to access it using the previous position prefix len.

Fixes #47.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 556


Files with Coverage Reduction New Missed Lines %
encodings/encoding.rs 3 94.96%
<!-- Total: 3 -->
Totals Coverage Status
Change from base Build 551: 0.02%
Covered Lines: 11088
Relevant Lines: 11624

💛 - Coveralls
sunchao commented 6 years ago

Merged. Thanks @sadikovi for the review :)