emilk opened a new pull request, #6951:
URL: https://github.com/apache/arrow-rs/pull/6951

   # Rationale for this change
   When formatting 32-bit or 64-bit floats, the current formatter always 
includes a `.0` suffix on integers, so that zero is formatted as `0.0`, one as 
`1.0`, etc. In cases where there is a lot of zeros (or integers), that can 
result in a lot of visual noise in the output.
   
   By contrast, the standard float formatter in Rust formats integers without a 
`.0` suffix.
   Similarly, the float formatter for `f16` in arrow also does not include the 
`.0` suffix, meaning the float formatting in arrow is inconsistent with both 
`std` and itself.
   
   # Changes
   This removes any `.0` suffix on formatted floats, so that zero is always 
formatted as `0`, regardless if it is stored as `f16`, `f32` or `u32`.
   
   # Alternatives
   We could add this as an option to `FormatOptions`, but that would require a 
larger refactor in order to access `FormatOptions` in `impl DisplayIndex for 
PrimitiveArray<Float32Type>`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to