Description
Hi @cowtowncoder,
Here I have few points to improve Avro support inspired by t is inspired by #132 (comment) and also your comment #132 (comment) .
-
Simple mapping of few Java date-time types to Avro logicalType on
expectIntegerFormat(JavaType type)
. The mapping works if ObjectMapper is used with JavaTimeModule andWRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
is disabled. In this combination JSR310 types are mapped to Avro LONG, only the logical type is missing.Implemented in
2.13
by [Avro] AddlogicalType
support for somejava.time
types; addAvroJavaTimeModule
for native ser/deser #283new ObjectMapper .registerModule(new JavaTimeModule()) .disable(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS) ...
-
Avro specific time module?
Implemented in
2.13
by [Avro] AddlogicalType
support for somejava.time
types; addAvroJavaTimeModule
for native ser/deser #283 -
To ease customization by a user I suggest to add protected method
VisitorFormatWrapperImpl createVisitorWrapper()
intoVisitorFormatWrapperImpl
which creates and returns a new instance of visitor wrapper. This method would be used on each place where new visitor instance is created inArrayVisitor
,MapVisitor
andRecordVisitor
.By having this in place it is easier to add / modify existing functionality by a user. He just needs to extend existing visitor wrapper and override particular method (just ask me how I know it).
protected VisitorFormatWrapperImpl createVisitorFormatWrapperImpl() { return new VisitorFormatWrapperImpl(_schemas, _provider); }
Implemented in
2.13
by [Avro] Ease future customization by unifying place where a new visitor is created. #292 -
Rename
VisitorFormatWrapperImpl
toAvroSchemaVisitorWrapper
- or other, better name. Current one is confusing. See [Avro] RenameVisitorFormatWrapperImpl
toAvroFormatVisitorWrapper
in 2.14 or 3.0 #294Will be implemented by [Avro] Rename
VisitorFormatWrapperImpl
toAvroFormatVisitorWrapper
in 2.14 or 3.0 #294
What do you think?
Michal