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/04/19 09:43:34 UTC

[GitHub] [pulsar] congbobo184 opened a new pull request #10265: [Python schema] Support python avro schema set default value.

congbobo184 opened a new pull request #10265:
URL: https://github.com/apache/pulsar/pull/10265


   ## Motivation
   now python avro schema don't support set default value, it led to the python schema can't update.
   ## implement
   1. add `required` field to control the type of schema can set `null`.
   2. add `required_default` filed to control to control the schema has default attribute wether or not.
   3. add `default` field to control the default value of schema.
   
   ### Verifying this change
   Add the tests for it
   
   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: (no)
   The default values of configurations: (no)
   The wire protocol: (no)
   The rest endpoints: (no)
   The admin cli options: (no)
   Anything that affects deployment: (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.

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



[GitHub] [pulsar] BewareMyPower commented on pull request #10265: [Python schema] Support python avro schema set default value.

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #10265:
URL: https://github.com/apache/pulsar/pull/10265#issuecomment-822394008


   It looks like there're still some problems with the implementation.
   
   ```
   File "/tmp/schema_test.py", line 810, in test_avro_required_default
       "default": None
   AssertionError: {'fields': [{'default': None, 'type': ['null', 'int'], 'name': 'a'}, {'default': [truncated]... != {'fields': [{'default': None, 'type': ['null', 'int'], 'name': 'a'}, {'default': [truncated]...
   ```


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] congbobo184 commented on pull request #10265: [Python schema] Support python avro schema set default value.

Posted by GitBox <gi...@apache.org>.
congbobo184 commented on pull request #10265:
URL: https://github.com/apache/pulsar/pull/10265#issuecomment-822333726


   @BewareMyPower  could you please review this pr? thanks :)


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on pull request #10265: [Python schema] Support python avro schema set default value.

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on pull request #10265:
URL: https://github.com/apache/pulsar/pull/10265#issuecomment-822547088


   mark as release/2.7.2 since this is a bug when the users using the schema in the Python client.


-- 
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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui merged pull request #10265: [Python schema] Support python avro schema set default value.

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #10265:
URL: https://github.com/apache/pulsar/pull/10265


   


-- 
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:
users@infra.apache.org