rdblue commented on code in PR #41: URL: https://github.com/apache/iceberg-python/pull/41#discussion_r1456467981
########## pyiceberg/table/__init__.py: ########## @@ -856,6 +909,61 @@ def history(self) -> List[SnapshotLogEntry]: def update_schema(self, allow_incompatible_changes: bool = False, case_sensitive: bool = True) -> UpdateSchema: return UpdateSchema(self, allow_incompatible_changes=allow_incompatible_changes, case_sensitive=case_sensitive) + def append(self, df: pa.Table) -> None: + """ + Append data to the table. + + Args: + df: The Arrow dataframe that will be appended to overwrite the table + """ + if len(self.spec().fields) > 0: + raise ValueError("Cannot write to partitioned tables") + + if len(self.sort_order().fields) > 0: + raise ValueError("Cannot write to tables with a sort-order") + + snapshot_id = self.new_snapshot_id() Review Comment: Minor: this can be handled inside of `_MergeAppend` since it has the table. -- 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