rdblue commented on code in PR #41:
URL: https://github.com/apache/iceberg-python/pull/41#discussion_r1429230197


##########
pyiceberg/table/__init__.py:
##########
@@ -209,6 +221,48 @@ def set_properties(self, **updates: str) -> Transaction:
         """
         return self._append_updates(SetPropertiesUpdate(updates=updates))
 
+    def add_snapshot(self, snapshot: Snapshot) -> Transaction:
+        """Add a new snapshot to the table.
+
+        Returns:
+            A new UpdateSchema.

Review Comment:
   Looks like a cut & paste error.



##########
pyiceberg/table/__init__.py:
##########
@@ -209,6 +221,48 @@ def set_properties(self, **updates: str) -> Transaction:
         """
         return self._append_updates(SetPropertiesUpdate(updates=updates))
 
+    def add_snapshot(self, snapshot: Snapshot) -> Transaction:
+        """Add a new snapshot to the table.
+
+        Returns:
+            A new UpdateSchema.
+        """
+        self._append_updates(AddSnapshotUpdate(snapshot=snapshot))
+
+        return self
+
+    def set_ref_snapshot(
+        self,
+        snapshot_id: int,
+        ref_name: str = "main",
+        type: str = "branch",
+        max_age_ref_ms: Optional[int] = None,
+        max_snapshot_age_ms: Optional[int] = None,
+        min_snapshots_to_keep: Optional[int] = None,
+    ) -> Transaction:
+        """Update a ref to a snapshot.
+
+        Returns:
+            A new UpdateSchema.

Review Comment:
   Same



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