merlimat opened a new pull request #12233:
URL: https://github.com/apache/pulsar/pull/12233


   ### Motivation
   
   Recently, a new keyword `required_default` was added to address the case 
where a `default=None` needs to be set on the schema. The problem with this 
argument is that it's really counterintuitive on its behavior.
   
   The problem was that we were not able to distinguish between `default=None` 
as in "there's no default" and `default=None` as in "there is a default which 
value is None". 
   
   The `required_default=True` was introduced for that but it's very confusing. 
   
   Instead, we should be able to just be able to use the original `required` 
and `default` keywords.
   
   ### Modification
   
   Use a special object value to distinguish between a default not set and 
default=None scenarios.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to