Copilot commented on code in PR #3953:
URL: https://github.com/apache/iceberg-python/pull/3953#discussion_r3994692858
##########
pyiceberg/manifest.py:
##########
@@ -306,6 +306,13 @@ def __repr__(self) -> str:
required=False,
doc="ID representing sort order for this file",
),
+ NestedField(
+ field_id=143,
+ name="referenced_data_file",
+ field_type=StringType(),
+ required=False,
Review Comment:
Adding field 143 makes `DATA_FILE_TYPE[2]` 17 fields, with
`referenced_data_file` at position 16, but the `DataFile` accessors still
assume the V3 layout (`first_row_id` at 16 and `referenced_data_file` at 17). A
V2-shaped `DataFile` will therefore expose the referenced path as
`first_row_id` and raise `IndexError` when `referenced_data_file` is accessed.
Please make these accessors version/layout-aware and add a V2-shaped read
assertion.
This issue also appears on line 309 of the same file.
--
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]