xanderbailey commented on code in PR #2367:
URL: https://github.com/apache/iceberg-rust/pull/2367#discussion_r3199945828


##########
crates/iceberg/src/transaction/append.rs:
##########
@@ -84,13 +84,13 @@ impl FastAppendAction {
 #[async_trait]
 impl TransactionAction for FastAppendAction {
     async fn commit(self: Arc<Self>, table: &Table) -> Result<ActionCommit> {
-        let snapshot_producer = SnapshotProducer::new(
-            table,
-            self.commit_uuid.unwrap_or_else(Uuid::now_v7),
-            self.key_metadata.clone(),
-            self.snapshot_properties.clone(),
-            self.added_data_files.clone(),
-        );
+        let snapshot_producer = SnapshotProducer::builder()
+            .with_table(table)
+            .with_commit_uuid(self.commit_uuid.unwrap_or_else(Uuid::now_v7))
+            .with_key_metadata(self.key_metadata.clone())
+            .with_snapshot_properties(self.snapshot_properties.clone())
+            .with_added_data_files(self.added_data_files.clone())
+            .build();

Review Comment:
   Nice change



##########
crates/iceberg/src/transaction/append.rs:
##########
@@ -84,13 +84,13 @@ impl FastAppendAction {
 #[async_trait]
 impl TransactionAction for FastAppendAction {
     async fn commit(self: Arc<Self>, table: &Table) -> Result<ActionCommit> {
-        let snapshot_producer = SnapshotProducer::new(
-            table,
-            self.commit_uuid.unwrap_or_else(Uuid::now_v7),
-            self.key_metadata.clone(),
-            self.snapshot_properties.clone(),
-            self.added_data_files.clone(),
-        );
+        let snapshot_producer = SnapshotProducer::builder()
+            .with_table(table)
+            .with_commit_uuid(self.commit_uuid.unwrap_or_else(Uuid::now_v7))
+            .with_key_metadata(self.key_metadata.clone())
+            .with_snapshot_properties(self.snapshot_properties.clone())
+            .with_added_data_files(self.added_data_files.clone())
+            .build();

Review Comment:
   Nice change



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

Reply via email to