CTTY commented on code in PR #3474:
URL: https://github.com/apache/iceberg-rust/pull/3474#discussion_r4365071302


##########
crates/iceberg/src/transaction/append.rs:
##########
@@ -88,79 +86,28 @@ impl FastAppendAction {
 
 #[async_trait]
 impl TransactionAction for FastAppendAction {
-    // TODO: replace with a persistent `SimpleSnapshotProducer` once snapshot
-    // production is migrated (stateful transaction RFC, milestone 2).
-    type State = ();
-
-    fn new_state(&self) -> Self::State {}
-
-    async fn commit(&self, _state: &mut (), table: &Table) -> 
Result<ActionCommit> {
-        let snapshot_producer = SnapshotProducer::new(
-            table,
-            self.commit_uuid.unwrap_or_else(Uuid::now_v7),
-            self.snapshot_properties.clone(),
-            self.dedupe_added_files(),
-            vec![],
-        );
+    type State = SimpleSnapshotProducer;
+
+    fn new_state(&self) -> Self::State {
+        SimpleSnapshotProducer::new(self.commit_uuid)
+    }
 
-        // validate added files
-        snapshot_producer.validate_added_data_files()?;
+    async fn commit(&self, state: &mut Self::State, table: &Table) -> 
Result<ActionCommit> {
+        let data_files = self.dedupe_added_files();

Review Comment:
   Yes I think the deduplication can be moved to the action



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