kevinjqliu commented on code in PR #1426:
URL: https://github.com/apache/iceberg-python/pull/1426#discussion_r1889384130


##########
pyiceberg/table/name_mapping.py:
##########
@@ -232,7 +234,9 @@ def mapping(self, nm: NameMapping, field_results: 
List[MappedField]) -> List[Map
 
     def fields(self, struct: List[MappedField], field_results: 
List[MappedField]) -> List[MappedField]:
         reassignments: Dict[str, int] = {
-            update.name: update.field_id for f in field_results if (update := 
self._updates.get(f.field_id))
+            update.name: update.field_id
+            for f in field_results
+            if f.field_id is not None and (update := 
self._updates.get(f.field_id))

Review Comment:
   thanks for the explanation! cc @Fokko / @sungwy for another set of eyes



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