What happened?
Java uses FloatCoder for encoding the FLOAT type, which encodes as a 4 byte single-precision floating point number. Go currently shunts FLOAT through the same path as DOUBLE:
|
case reflect.Float32, reflect.Float64: |
|
return typeEncoderFieldReflect{encode: func(rv reflect.Value, w io.Writer) error { |
|
return EncodeDouble(rv.Float(), w) |
|
}}, nil |
I've currently proposed to make the Python implementation the same as Java: #22626
I think we should do this in Go as well.
Issue Priority
Priority: 2
Issue Component
Component: sdk-go