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 14:55:51 UTC

[GitHub] [pulsar] hangc0276 opened a new issue #12241: Python2 & Python3 has different behavior on generate schema fields

hangc0276 opened a new issue #12241:
URL: https://github.com/apache/pulsar/issues/12241


   **Describe the bug**
   Python 2 and Python 3 generate object schema without sort in different behavior.
   Take the following class for example
   ```Python
   class T2(Record):
     b = Integer()
     a = Integer()
     d = String()
     c = Double()
   ```
   Python2 generated field schema:
   ```
   [{'type': ['null', 'int'], 'name': 'a'}, {'type': ['null', 'double'], 'name': 'c'}, {'type': ['null', 'int'], 'name': 'b'}, {'type': ['null', 'string'], 'name': 'd'}]
   ```
   
   Python3 generated field schema:
   ```
   [{'type': ['null', 'int'], 'name': 'b'}, {'type': ['null', 'int'], 'name': 'a'}, {'type': ['null', 'string'], 'name': 'd'}, {'type': ['null', 'double'], 'name': 'c'}]
   ```
   
   Python3 generated field schema in POJO field define order, but Python2 generated field schema order is not. It is the dict key order for the field name.
   
   


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



[GitHub] [pulsar] github-actions[bot] commented on issue #12241: Python2 & Python3 has different behavior on generate schema fields

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #12241:
URL: https://github.com/apache/pulsar/issues/12241#issuecomment-1069836956


   The issue had no activity for 30 days, mark with Stale label.


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