fix to Avro writer special cases

This commit is contained in:
Aditya Ujeniya
2025-05-14 17:29:28 +02:00
parent a03eb315f5
commit 5569ad53d2
6 changed files with 149 additions and 110 deletions

View File

@@ -28,6 +28,10 @@ func (f Float) MarshalJSON() ([]byte, error) {
return strconv.AppendFloat(make([]byte, 0, 10), float64(f), 'f', 3, 64), nil
}
func (f Float) Double() float64 {
return float64(f)
}
func (f *Float) UnmarshalJSON(input []byte) error {
if string(input) == "null" {
*f = NaN