aljoscha opened a new pull request #9565: [FLINK-12510] Use 
SpecificRecord.getSchema in AvroFactory
URL: https://github.com/apache/flink/pull/9565
 
 
   ## What is the purpose of the change
   
   Before, we were using SpecificData.getSchema(type) which was not working
   for types that were generated using Avrohugger (for Scala) because
   the SCHEMA was generated in the companion object. Now we use a method
   that must be available on all SpecificRecord(s).
   
   We still use the old method as a fallback if we cannot instantiate or
   call getSchema() on the instance.
   
   ## Brief change log
   
     - We create an instance of the `SpecificRecord` using `Class.newInstance` 
and then call `SpecificRecord.getSchema()`. We use the old method as a fallback
   
   ## Verifying this change
   
   This is covered by existing tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - The serializers: yes, the avro serializer
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to