I have a avro schema which has some float values and i am using java code to send events and receiving using python consumer.
For some reason float value serialization and deserialization is not working.
Avro schema:-
{
"type": "record",
"name": "Marks",
"namespace": "com.Marks.sample",
"fields": [
{
"name": "Name",
"type": {
"type": "string",
"avro.java.string": "String"
}
},
{
"name": "Marks",
"type": [
"null",
{
"type": "record",
"name": "Marks",
"fields": [
{
"name": "Maths",
"type": "float"
}
]
}
],
"default": null
}
]
}
Hello,
I have a avro schema which has some float values and i am using java code to send events and receiving using python consumer. For some reason float value serialization and deserialization is not working. Avro schema:- { "type": "record", "name": "Marks", "namespace": "com.Marks.sample", "fields": [ { "name": "Name", "type": { "type": "string", "avro.java.string": "String" } }, { "name": "Marks", "type": [ "null", { "type": "record", "name": "Marks", "fields": [ { "name": "Maths", "type": "float" } ] } ], "default": null } ] }
Sample Data:- {"Name": "Avro", "Marks": { "Maths": 20.0}}
Expected: {"Name": "Avro", "Marks": { "Maths": 20.0}} Actual:{"Name": "Avro", "Marks": { "Maths": -1.8671875}}
please help me resolve this issue.