Vamsi Subhash Achanta created AVRO-2243:
-------------------------------------------

             Summary: Add support for adding Union types for a Class without 
@Union annotation when not possible to mutate the class
                 Key: AVRO-2243
                 URL: https://issues.apache.org/jira/browse/AVRO-2243
             Project: Avro
          Issue Type: Improvement
          Components: java
    Affects Versions: 1.8.2
            Reporter: Vamsi Subhash Achanta


This patch facilitates the addition of Union types for a given class. This is 
equivalent to adding an @Union annotation with values. But this can help in 
cases where you cannot mutate the class to annotate it (or don't want to use 
java-agent to transform/mutate the class at runtime). 

UseCase:

In our project, we are using ReflectData to generate schema for external jar 
imported classes which cannot be mutated. In this scenario, we cannot add 
@Union annotation to the base class to add all implemenations of the derived 
classes. So, when generating schema, the derived classes are not included.

This patch will enable us to add the union type information so that ReflectData 
can generate the schema with union types also in it.

Please let us know if you have any questions. I would make corresponding 
changes. Thanks



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to