WZhuo opened a new pull request, #19279:
URL: https://github.com/apache/iceberg/pull/19279

   The spec's JSON single-value serialization (Appendix D) defines `float` and 
`double` values as JSON numbers. `SingleValueParser.fromJson` only checked 
`isFloatingPointNumber()`, so it rejected whole-number literals such as `0` or 
`-1`. Another writer could produce those for an `initial-default` or 
`write-default`.
   
   This PR changes the `FLOAT` and `DOUBLE` checks to `isNumber()`. 
Serialization does not change: values are still written with a fractional part 
(for example `0.0`).
   
   Dev list discussion: 
https://lists.apache.org/thread/1dn6c2ytq0qpwgvv2tqr9wvyswdxhh2t
   
   ### Testing
   
   Added whole-number cases (`0`, `-1`) for float and double to 
`TestSingleValueParser#testValidDefaults`. Each new case checks that the value 
round-trips to its fractional form.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to