Skip to content

Commit

Permalink
Fix record formatting in 1.58
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Jan 14, 2022
1 parent 68e5750 commit 76f6d0c
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 76f6d0c

Please sign in to comment.