Hi Guys,
I am trying to register custom logical type handler in Java, but don't know
how to map the java class to the logical type in the schema.
My class
public class ShortString extends LogicalType{
public ShortString() {
super("short-string");
}
@Override
public void validate(Schema schema) {
throw new IllegalArgumentException("not implemented");
}
}
My schema:
"type": "record",
"namespace": "com.xy.serialization",
"name": "SerializableLineItem",
"fields":
[
{
"name": "lineItemId",
"type": "string",
"logicalType": "short-string",
"namespace": "com.amazon.awsbilladjustments.avro"
}
]
}, {logicalTypes: {'short-string': ????ShortString.class????}}
Anyobdy has any idea ?
Thanks,
Janos