Fokko commented on code in PR #1534:
URL: https://github.com/apache/iceberg-python/pull/1534#discussion_r1943525204


##########
pyiceberg/table/__init__.py:
##########
@@ -1064,6 +1067,81 @@ def name_mapping(self) -> Optional[NameMapping]:
         """Return the table's field-id NameMapping."""
         return self.metadata.name_mapping()
 
+    @dataclass
+    class UpsertResult:
+        """docstring"""
+        rows_updated: int
+        rows_inserted: int
+        info_msgs: str
+        error_msgs: str

Review Comment:
   I think we can do a bit better here. We can set some defaults and make [it 
frozen](https://docs.python.org/3/library/dataclasses.html#frozen-instances). 
   ```suggestion
       @dataclass(frozen=True)
       class UpsertResult:
           """Summary the upsert operation"""
           rows_updated: int = 0
           rows_inserted: int = 0
           info_msg: Optional[str] = None
           error_msg: Optional[str] = None
   ```



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

Reply via email to