Skip to content

Commit

Permalink
Fix record formatting in 1.58 (apache#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored and ovr committed Apr 2, 2024
1 parent 8fe9e06 commit 4b05fac
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 @@ -715,15 +715,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 4b05fac

Please sign in to comment.