HugoPelletier opened a new pull request #11559: URL: https://github.com/apache/pulsar/pull/11559
Fixes #11558 ### Motivation Not all sub-records are required in a schema. Taking this context into account, the code of the Record class ignored its own default values (`required=False` and `default=None`) ### Modifications The modification is a continuation of the ones made in the PR https://github.com/apache/pulsar/pull/11508. This time only the `Record` class has changed. The modification affects the validation. A check of the value and the `required` attribute is done before validating the data type. So if the value is empty and the `required` is False, the default is returned instead of raising an exception. ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change added tests and can be verified as follows: - *Added unit tests ### Does this pull request potentially affect one of the following parts: *If `yes` was chosen, please highlight the changes* - Dependencies (does it add or upgrade a dependency): no - The public API: no - The schema: yes - The default values of configurations: no - The wire protocol: no - The rest endpoints: no - The admin cli options: no - Anything that affects deployment: no ### Documentation #### For contributor No documentation update is required. The definition of the `Record` class wasn't respected #### For committer For this PR, do we need to update docs? No -- 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]
