moonboots300 commented on issue #4271: Pulsar Avro Schema Enum improvement 
request
URL: https://github.com/apache/pulsar/issues/4271#issuecomment-492005296
 
 
   so for #2. (java) I found that setting .withAlwaysAllowNull(false) and 
marking fields as @Nullable (org.apache.avro.reflect.Nullable) as a workaround 
works. Still not perfect, but slightly better than originally mentioned. 
   
   > How do you suggest the declaration for enums with "annotations" should 
look like in Python?
   
   I suggest that there be a similar method to mark an Enum as required. It 
should look like this when I define a class that extends Record (to create a 
schema). I am not as familiar with Python Enums, so I may be missing something. 
I suppose there is some rule that prevents passing "required=True" to an enum?
   
   class MyObject(Record):
         a = String()
         b = Integer(required=True)
         c = **MyEnum(required=True)**

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