You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/29 04:50:02 UTC

[GitHub] [pulsar] gaoran10 commented on a change in pull request #12233: [Python] Allow required=False default=None setting on fields

gaoran10 commented on a change in pull request #12233:
URL: https://github.com/apache/pulsar/pull/12233#discussion_r718150336



##########
File path: pulsar-client-cpp/python/pulsar/schema/definition.py
##########
@@ -60,10 +64,13 @@ class Record(with_metaclass(RecordMeta, object)):
     # This field is used to set namespace for Avro Record schema.
     _avro_namespace = None
 
-    def __init__(self, default=None, required_default=False, required=False, *args, **kwargs):
-        self._required_default = required_default
+    # Generate a schema where fields are sorted alphabetically
+    _sorted_fields = False
+
+    def __init__(self, default=None, required=False, required_default=False, *args, **kwargs):

Review comment:
       Do we need to change the param `default` of the `Record` to `_empty_default`?




-- 
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: commits-unsubscribe@pulsar.apache.org

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