Fokko commented on code in PR #349:
URL: https://github.com/apache/iceberg-rust/pull/349#discussion_r1579412576
##########
crates/iceberg/src/transaction.rs:
##########
@@ -95,6 +104,42 @@ impl<'a> Transaction<'a> {
Ok(self)
}
+ /// Creates a fast append action.
+ pub fn fast_append(
+ self,
+ commit_uuid: Option<String>,
+ key_metadata: Vec<u8>,
+ ) -> Result<FastAppendAction<'a>> {
+ let parent_snapshot_id = self
+ .table
+ .metadata()
+ .current_snapshot()
+ .map(|s| s.snapshot_id());
+ let snapshot_id = parent_snapshot_id.map(|id| id + 1).unwrap_or(0);
Review Comment:
The snapshot ID is a random int, and it should be checked if it hasn't been
used before:
https://github.com/apache/iceberg-python/blob/f72e363b18baa181c998bbdef657982159a22d48/pyiceberg/table/metadata.py#L315-L326
--
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]