Fokko commented on code in PR #523:
URL: https://github.com/apache/iceberg-python/pull/523#discussion_r1542475835
##########
pyiceberg/table/__init__.py:
##########
@@ -1118,7 +1126,10 @@ def append(self, df: pa.Table, snapshot_properties:
Dict[str, str] = EMPTY_DICT)
if len(self.spec().fields) > 0:
raise ValueError("Cannot write to partitioned tables")
- _check_schema(self.schema(), other_schema=df.schema)
+ _check_schema_compatible(self.schema(), other_schema=df.schema)
+ # cast if the two schemas are compatible but not equal
+ if self.schema().as_arrow() != df.schema:
Review Comment:
nit: It would be good to call `as_arrow()` just once in case we need to cast.
--
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]