JonasJ-ap commented on code in PR #6997: URL: https://github.com/apache/iceberg/pull/6997#discussion_r1174167581
########## python/pyiceberg/io/pyarrow.py: ########## @@ -122,6 +126,12 @@ ONE_MEGABYTE = 1024 * 1024 BUFFER_SIZE = "buffer-size" ICEBERG_SCHEMA = b"iceberg.schema" +FIELD_ID = "field_id" +FIELD_DOC = "doc" +PYARROW_FIELD_ID_KEYS = [b"PARQUET:field_id", b"field_id"] Review Comment: I added support for the non-prefixed `field_id` to maintain consistency with the `schema_to_pyarrow` visitor, which uses `field_id` as the metadata key. This support may be helpful in the future if we use this visitor to get the `pa.Schema` for writing data files. Additionally, it allows us to perform round-trip tests by combining `schema_to_pyarrow` and `pyarrow_to_schema`. The `pyarrow_to_schema` visitor first looks for `PARQUET:field_id` and then falls back to `field_id`, so the behavior is as expected. However, if you still think the non-prefixed `field_id` should not be supported, please let me know. -- 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]
