ashley-taylor opened a new pull request, #3425:
URL: https://github.com/apache/avro/pull/3425

   This PR adds the ability to use the `CustomEncode` annotation directly on a 
class.
   
   It required some changes to when this annotation would be scanned. 
Currently, it is only used on fields.
   Getting this to work for the first Record written required additional 
changes to support the feature.
   
   I added a new map on `ReflectData` as I feel this is cleaner from an 
encapsulation point of view. Alternatively, it could be added to 
`SpecifiedData` by changing the `classCache` map to an object that stores the 
class and this `CustomEncoding`. This may be slightly faster, as there would be 
one less map lookup. However, it would probably be negligible as this new 
lookup is only performed once per row, whereas other maps can be queried per 
field.
   
   This change added tests and can be verified as follows:
   - *Added tests that use the annotation in the new place. Checking it works 
at the top of the structure. Also tested as a field and precedence if competing 
encoders
   - 
   ## Documentation
   - Does this pull request introduce a new feature? yes
   - If yes, how is the feature documented? CustomEncode will appear in IDE 
IntelliSense in this location now.
   
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@avro.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to