eolivelli opened a new pull request #9343: URL: https://github.com/apache/pulsar/pull/9343
Fixes #9004 ### Motivation GenericRecord API exposes the list of `Fields` but not the datatype associated to the field. this patch introduces support for retrieving the `Schema` for each Field. This information is available only for the limited subset of data types supported by Pulsar, for instance Avro MAPS and ARRAYS are not implemented and there is not way to represent such data types using SchemaType. In the future when support for new datatype will be added we will support those new types in this system. The implementation covers Avro and JSON schema types. With this implementation Pulsar IO support for Metadata will be more similar the one in Kafka Connect, even we are still far as we do not have full support for all AVRO datatypes. ### Modifications - add new Field#getSchema method - add new version of RecordSchemaBuilder#field that accepts a Schema instead of a GenericSchema (` FieldSchemaBuilder field(String fieldName, org.apache.pulsar.client.api.Schema<?> genericSchema);`) - add relevant test cases ### Verifying this change This change added tests. I tested manually that on Sinks the information is available, there is no need to add more integration tests ### Documentation - Does this pull request introduce a new feature? yes - If yes, how is the feature documented? JavaDocs ---------------------------------------------------------------- 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