sijie commented on a change in pull request #3690: [schema] Introduce GenericRecordBuilder and the avro implementation URL: https://github.com/apache/pulsar/pull/3690#discussion_r262032547
########## File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericAvroSchema.java ########## @@ -78,4 +79,8 @@ public GenericRecord decode(byte[] bytes, byte[] schemaVersion) { } } + @Override + public GenericRecordBuilder newRecordBuilder() { Review comment: 1) Technically GenericRecordBuilder doesn't limit the complex types. It is only a wrapper over AVRO builder, so whatever AVRO supports it can support. So it doesn't actually fail if you try to set complex types that AVRO supports. So I don't think we need to fail it when a schema has complex types. 2) secondly a GenericRecord schema can only be built by GenericRecordSchemaBuilder, which has thrown exception if you are using complex types. So you can't really create a generic record builder without creating a generic schema. So we are safe here. 3) I have a subsequent pull request to support complex types. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services