clesaec commented on code in PR #2529:
URL: https://github.com/apache/avro/pull/2529#discussion_r2571554223
##########
lang/java/avro/src/main/java/org/apache/avro/io/JsonEncoder.java:
##########
@@ -208,7 +208,7 @@ public void writeLong(long n) throws IOException {
@Override
public void writeFloat(float f) throws IOException {
parser.advance(Symbol.FLOAT);
- out.writeNumber(f);
+ out.writeNumber(f + 0d);
Review Comment:
Hum, right.. The strange thing is casting the float to double give extra
precision. But indeed, float store only 8 bytes, not ENOUGH for 33.3300018...
--
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]