Closed RobertIndie closed 1 year ago
Hi, it seems that we depend on this field to get the actual schema. You can see it being generated when using Avro generator, so I think you need to add it manually when using hand-written classes. If it won't work you might need to try contribute to Avro itself to add logical types support
By the way, it seems that logical types might be already supported, https://avro.apache.org/docs/1.11.0/api/csharp/html/classAvro_1_1Util_1_1LogicalType.html , however I haven't tried it
Closing since decimal support was added to AVRO https://github.com/fsprojects/pulsar-client-dotnet/issues/227
I want to use the logical types in the Avro schema. But seems that Avro C# doesn't support logical types. It will throw the exception like below:
Here is the class I used:
And then I try to use SpecificDatumWriter to encode the message. The message class is
And it throwed:
The root cause is that the client tried to get a field called "_SCHEMA" from the message class. https://github.com/fsprojects/pulsar-client-dotnet/blob/25e41f28a3f46eae955761c4ad12d9973ae333eb/src/Pulsar.Client/Schema/AvroSchema.fs#L22 But why does it want to get this field? How to use logical types in avro schema correctly?