Skip to content

Commit

Permalink
feat: implement restore operation (delta-io#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
loleek committed Jun 30, 2023
1 parent 3a412a0 commit 210c9b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/src/operations/restore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use object_store::path::Path;
use object_store::ObjectStore;

use crate::action::{Action, Add, DeltaOperation, Remove};
use crate::operations::transaction::{prepare_commit, TransactionError, try_commit_transaction};
use crate::operations::transaction::{prepare_commit, try_commit_transaction, TransactionError};
use crate::storage::ObjectStoreRef;
use crate::table_state::DeltaTableState;
use crate::{action, DeltaResult, DeltaTable, DeltaTableConfig, DeltaTableError, ObjectStoreError};
Expand Down Expand Up @@ -231,10 +231,10 @@ async fn execute(
.await?;
let commit_version = snapshot.version() + 1;
match try_commit_transaction(object_store.as_ref(), &commit, commit_version).await {
Ok(_) => {},
Ok(_) => {}
Err(err @ TransactionError::VersionAlreadyExists(_)) => {
return Err(err.into());
},
}
Err(err) => {
object_store.delete(&commit).await?;
return Err(err.into());
Expand Down

0 comments on commit 210c9b6

Please sign in to comment.