This is an automated email from the ASF dual-hosted git repository. fokko pushed a commit to branch fd-improvement in repository https://gitbox.apache.org/repos/asf/iceberg-python.git
commit edfe9e41649edd80c8ced96e7d3e38cf9c57d98c Author: Fokko Driesprong <[email protected]> AuthorDate: Thu Feb 1 21:45:22 2024 +0100 Small simplification in the name-mapping Noticed this while debugging some stuff. --- pyiceberg/io/pyarrow.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyiceberg/io/pyarrow.py b/pyiceberg/io/pyarrow.py index 9e05e2d..b72af2c 100644 --- a/pyiceberg/io/pyarrow.py +++ b/pyiceberg/io/pyarrow.py @@ -811,12 +811,9 @@ class _ConvertToIceberg(PyArrowSchemaVisitor[Union[IcebergType, Schema]]): self._field_names = [] self._name_mapping = name_mapping - def _current_path(self) -> str: - return ".".join(self._field_names) - def _field_id(self, field: pa.Field) -> int: if self._name_mapping: - return self._name_mapping.find(self._current_path()).field_id + return self._name_mapping.find(*self._field_names).field_id elif (field_id := _get_field_id(field)) is not None: return field_id else:
