Skip to content

Commit

Permalink
Fix record formatting in 1.58 (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Jan 15, 2022
1 parent f2d7a21 commit 66b84f3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions parquet/src/record/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,15 +716,19 @@ impl fmt::Display for Field {
Field::Float(value) => {
if !(1e-15..=1e19).contains(&value) {
write!(f, "{:E}", value)
} else if value.trunc() == value {
write!(f, "{}.0", value)
} else {
write!(f, "{:?}", value)
write!(f, "{}", value)
}
}
Field::Double(value) => {
if !(1e-15..=1e19).contains(&value) {
write!(f, "{:E}", value)
} else if value.trunc() == value {
write!(f, "{}.0", value)
} else {
write!(f, "{:?}", value)
write!(f, "{}", value)
}
}
Field::Decimal(ref value) => {
Expand Down

0 comments on commit 66b84f3

Please sign in to comment.