sunchao / parquet-rs

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

Format long Float and Double fields #153

Closed sadikovi closed 6 years ago

sadikovi commented 6 years ago

This PR addresses the issue in record reader of displaying long values of Field::Float and Field::Double. When value is long (value > 1e19 || value < 1e-15), we display it in scientific notation, otherwise the default one.

I found this definition of "long" values here: https://github.com/maciejhirsz/json-rust/pull/32/files#diff-d0b3721173a6539188b808c57c0b4b08R54

sadikovi commented 6 years ago

@sunchao Could you review this PR? Thanks!

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 598


Files with Coverage Reduction New Missed Lines %
record/api.rs 9 96.96%
<!-- Total: 9 -->
Totals Coverage Status
Change from base Build 596: 0.009%
Covered Lines: 12048
Relevant Lines: 12617

💛 - Coveralls