sebpretzer opened a new issue, #229: URL: https://github.com/apache/iceberg-python/issues/229
### Apache Iceberg version main (development) ### Please describe the bug 🐞 When publishing a schema via `create_table`, the `id`s sometimes re-order. I haven't looked into all cases, but I have noticed this specifically with glue, specifically for nested/complex types. This does not happen when using the `InMemoryCatalog`. I have started a branch with tests that re-create this issue here: https://github.com/sebpretzer/iceberg-python/tree/schema_id_reordering (if you do look at my code, please ignore the `schema_id=0` in `conftest.py` for now) Is this in fact a bug, or is this intended behavior? `table_schema_nested` vs `table.schema()`: ```diff { "type": "struct", "fields": [ { "id": 1, "name": "foo", "type": "string", "required": false }, { "id": 2, "name": "bar", "type": "int", "required": true }, { "id": 3, "name": "baz", "type": "boolean", "required": false }, { "id": 4, "name": "qux", "type": { "type": "list", - "element-id": 5, + "element-id": 8, "element": "string", "element-required": true }, "required": true }, { - "id": 6, + "id": 5, "name": "quux", "type": { "type": "map", - "key-id": 7, + "key-id": 9, "key": "string", - "value-id": 8, + "value-id": 10, "value": { "type": "map", - "key-id": 9, + "key-id": 11, "key": "string", - "value-id": 10, + "value-id": 12, "value": "int", "value-required": true }, "value-required": true }, "required": true }, { - "id": 11, + "id": 6, "name": "location", "type": { "type": "list", - "element-id": 12, + "element-id": 13, "element": { "type": "struct", "fields": [ { - "id": 13, + "id": 14, "name": "latitude", "type": "float", "required": false }, { - "id": 14, + "id": 15, "name": "longitude", "type": "float", "required": false } ] }, "element-required": true }, "required": true }, { - "id": 15, + "id": 7, "name": "person", "type": { "type": "struct", "fields": [ { "id": 16, "name": "name", "type": "string", "required": false }, { "id": 17, "name": "age", "type": "int", "required": true } ] }, "required": false } ], "schema-id": 0, "identifier-field-ids": [ 2 ] } ``` -- 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: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org