Repository navigation
Remove leftover name-mapping bookkeeping from _ConvertToIceberg - #4381
Conversation
Name mapping moved out of this visitor into apply_name_mapping in apache#1014, but the docstring still claims it applies name-mapping IDs, and list() and map() still push and pop field names around the _field_id calls, which no longer read them.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the converter bookkeeping and docstring cleanup.
No open issues 🎉
What changed in this PR
Cleans up _ConvertToIceberg after name-mapping logic moved to apply_name_mapping in #1014, without changing field-ID selection or nested error-path tracking.
Changes:
- Removes redundant field-name stack updates around list and map ID lookups.
- Corrects the class docstring by removing the outdated name-mapping claim.
| File | Description |
|---|---|
pyiceberg/io/pyarrow.py |
Removes unused list/map bookkeeping and updates the converter docstring. |
Review effort: Balanced
|
@Fokko Could you please take a look? |
Fokko
left a comment
There was a problem hiding this comment.
Thanks @chenjian2664! Nice cleanup 🙏
I checked the visitor flow: before_list_element / before_map_key / before_map_value already push onto _field_names (which is only read for the null-type error path in primitive()), so the pushes inside list() and map() were indeed dead bookkeeping. The docstring fix is correct too, name mapping moved to apply_name_mapping in #1014.
CI is green. LGTM!
Rationale for this change
Name mapping moved out of
_ConvertToIcebergintoapply_name_mappingin #1014, but the class docstring still says it applies name-mapping IDs, andlist()andmap()still push and pop_field_namesaround_field_id, which no longer reads them. This removes that dead bookkeeping and corrects the docstring.Are these changes tested?
Are there any user-facing changes?