Skip to content

Commit ec92bc5

Browse files
chore: make Transaction cloneable (#1474)
## What changes are included in this PR? ## Are these changes tested? No op change, but compilation and existing tests all pass. Co-authored-by: Renjie Liu <liurenjie2008@gmail.com>
1 parent df6f999 commit ec92bc5

File tree

1 file changed

+2
-1
lines changed
  • crates/iceberg/src/transaction

1 file changed

+2
-1
lines changed

crates/iceberg/src/transaction/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ use crate::transaction::upgrade_format_version::UpgradeFormatVersionAction;
7474
use crate::{Catalog, TableCommit, TableRequirement, TableUpdate};
7575

7676
/// Table transaction.
77+
#[derive(Clone)]
7778
pub struct Transaction {
7879
table: Table,
7980
actions: Vec<BoxedTransactionAction>,
@@ -154,7 +155,7 @@ impl Transaction {
154155
pub async fn commit(mut self, catalog: &dyn Catalog) -> Result<Table> {
155156
if self.actions.is_empty() {
156157
// nothing to commit
157-
return Ok(self.table.clone());
158+
return Ok(self.table);
158159
}
159160

160161
self.do_commit(catalog).await

0 commit comments

Comments
 (0)