-
-
Notifications
You must be signed in to change notification settings - Fork 144
Closed
Milestone
Description
I want to implement a toggle to enable / disable logicalType
generation in Avro schema. I am bit lost here, I do not know where to add new feature, whether to AvroGenerator.Feature
, AvroMapper.Feature
or AvroParser
.
When I start backwards, I do know how to check whether the feature is enable. I have in my mind following implementation in VisitorFormatWrapperImpl
:
public class VisitorFormatWrapperImpl implements JsonFormatVisitorWrapper {
@Override
public JsonIntegerFormatVisitor expectIntegerFormat(JavaType type) {
...
if (GENERATE_LOGICAL_TYPE feature enabled){
if (_isDateTimeType(type)) {
DateTimeVisitor v = new DateTimeVisitor(type);
_builder = v;
return v;
}
}
IntegerVisitor v = new IntegerVisitor(type);
_builder = v;
return v;
}
}
My Question is: How to make if (GENERATE_LOGICAL_TYPE feature enabled)
condition?
Cheers,
Michal
Metadata
Metadata
Assignees
Labels
No labels