Hi, I am trying to parse a long value into optional long type, but it gives an exception stating can't find a match for System.Double. If I include double in the type, then it works fine. Please find below details -
AVRO schema -
{ "name": "xyz", "type": ["long", "null"], "default": null, "logicalType": "timestamp-millis" }
Exception -
Avro.AvroException: Cannot find a match for System.Double in {"type":["long","null"]} in field ********* at Avro.Generic.DefaultWriter.WriteRecord(RecordSchema schema, Object value, Encoder encoder) at Confluent.SchemaRegistry.Serdes.GenericSerializerImpl.Serialize(String topic, GenericRecord data, Boolean isKey) at Confluent.SchemaRegistry.Serdes.AvroSerializer1.SerializeAsync(T value, SerializationContext context)
at Confluent.Kafka.Producer2.ProduceAsync(TopicPartition topicPartition, Message2 message)
--- End of inner exception stack trace ---`
I will really appreciate any inputs or workaround with this regard.
Hi, I am trying to parse a long value into optional long type, but it gives an exception stating can't find a match for System.Double. If I include double in the type, then it works fine. Please find below details -
AVRO schema -
{ "name": "xyz", "type": ["long", "null"], "default": null, "logicalType": "timestamp-millis" }Exception -
Avro.AvroException: Cannot find a match for System.Double in {"type":["long","null"]} in field ********* at Avro.Generic.DefaultWriter.WriteRecord(RecordSchema schema, Object value, Encoder encoder) at Confluent.SchemaRegistry.Serdes.GenericSerializerImpl.Serialize(String topic, GenericRecord data, Boolean isKey) at Confluent.SchemaRegistry.Serdes.AvroSerializer1.SerializeAsync(T value, SerializationContext context)at Confluent.Kafka.Producer
2.ProduceAsync(TopicPartition topicPartition, Message2 message)--- End of inner exception stack trace ---`
I will really appreciate any inputs or workaround with this regard.