HonahX commented on code in PR #581:
URL: https://github.com/apache/iceberg-python/pull/581#discussion_r1555104577


##########
pyiceberg/io/pyarrow.py:
##########
@@ -1089,7 +1091,7 @@ def project_table(
             deletes_per_file.get(task.file.file_path),
             case_sensitive,
             limit,
-            table.name_mapping(),
+            None,

Review Comment:
   I think we need to move `name_mapping()` method to table_metadata and call 
it here.
   ```python
   table_metadata.name_mapping()
   ```
   Otherwise, we no longer use the name-mapping feature during reading.
   
   For example, if I addd
   ```
   print(tbl.scan().to_pandas())
   ```
   to the end of test: 
https://github.com/apache/iceberg-python/blob/main/tests/integration/test_add_files.py#L214
   `project_table` will complain that field-id is not found in the added 
parquet file, but the table does have name-mapping configured.



-- 
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

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

Reply via email to