rdblue commented on code in PR #41:
URL: https://github.com/apache/iceberg-python/pull/41#discussion_r1429241217
##########
pyiceberg/table/__init__.py:
##########
@@ -830,6 +884,49 @@ 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 write_arrow(self, df: pa.Table, mode: Literal['append', 'overwrite'] =
'overwrite') -> None:
+ if len(self.spec().fields) > 0:
+ raise ValueError("Currently only unpartitioned tables are
supported")
+
+ snapshot_id = self.new_snapshot_id()
+ parent_snapshot_id = current_snapshot.snapshot_id if (current_snapshot
:= self.current_snapshot()) else None
Review Comment:
Should we support branch writes?
No need to right away. It's probably easier to get tests right if we only
support main right now and add branching (and tests) in another PR.
--
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]