[schema] check if exists default constructor for avro/json schema#10395
[schema] check if exists default constructor for avro/json schema#10395linlinnn wants to merge 3 commits intoapache:masterfrom
Conversation
|
LGTM |
congbobo184
left a comment
There was a problem hiding this comment.
I don't think it is a good change, avro api has checked this. we don't need to check this, give it to avro api is better.
@congbobo184 @Data
@AllArgsConstructor
public static class Payload {
String message;
}
public static void main(String[] args) {
AvroSchema<Payload> schema = AvroSchema.of(Payload.class);
Payload payload = new Payload("test");
...
producer.send(payload); // successfully
Message<Payload> message = consumer.receive();
message.getValue(); // exception
} |
|
@linlinnn Do we need to track every question about avro in advance? consume failed has given you an error about this, why we need to check in pulsar |
|
@congbobo184 |
Fixes #10393
Fixes #10377
Motivation
Check if exists default constructor for avro/json schema
Simplify code
Verify
Add unit test