Fokko opened a new issue, #4985:
URL: https://github.com/apache/iceberg/issues/4985
Hi everyone 👋🏻
I'm working on the (de)serialization of the TableMetadata and noticed that
there are some discrepancies between the public Python API and the naming in
the Python spec. Mostly when it comes to types. I would suggest updating these
fields to make (de)serialization easier, but also to keep consistency in the
different libraries.
- NestedField
- `field_id`: `id` in the spec, but `id` is a keyword in Python, which is
not recommended to use.
- `name`
- `field_type`: `type` in the spec, but `type` is a keyword in Python,
which is not recommended to use.
- `is_optional` → `required`
- `doc`
- **StructType**
- `fields`
- **ListType**
- `type`
- `element_id`
- `element_type` → `element`
- `element_is_optional` → `element_required`
- `element` → `element_field`: `element` is a type in the spec, not a field
- **MapType**
- `key_id`
- `key_type` → `key`
- `value_id`
- `value_type` → `value`
- `value_is_optional` → `value_required`
- `key` → `key_field`: `key` is a type in the spec, not a field
- `value` → `value_field`: `value` is a type in the spec, not a field
I would love to get feedback from the community on this. I would love to get
closer to the naming in the spec since there is no official release of the
Python package.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]