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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]