Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2641d62
feat(transaction): add OverwriteAction with CoW delete support
glitchy Jun 13, 2026
4999d69
Get the previous snapshot directly from the table_metadata and add up…
timsaucer Mar 11, 2026
a11e3b5
allow delete-only overwrite when no data files are added
gbrgr May 28, 2026
5493b3a
chore(transaction): rustfmt and refresh public API snapshot for Overw…
glitchy Jun 13, 2026
2b175f2
refactor(transaction): hoist inline spec imports in overwrite
glitchy Jun 30, 2026
362c3c1
Merge remote-tracking branch 'origin/main' into pr-2185-fixes
jopdorp Sep 18, 2026
ede30bd
Adapt to current SnapshotProducer and manifest reader APIs
jopdorp Sep 18, 2026
2664505
Keep deleted entries deleted when rewriting a manifest
jopdorp Sep 18, 2026
ca9bad1
Stamp a rewritten manifest with the schema and spec it was written under
jopdorp Sep 18, 2026
d782adc
Keep delete-only manifests when overwriting
jopdorp Sep 18, 2026
cbae245
Count the deletions the overwrite actually made
jopdorp Sep 18, 2026
7f4f3ed
Name a rewritten manifest after the commit uuid
jopdorp Sep 18, 2026
774f62a
Write rewritten manifests through the encryption manager
jopdorp Sep 18, 2026
bd931fd
Rename add_deleted_entry to add_tombstone_entry
jopdorp Sep 18, 2026
abad9a5
Report the operation an overwrite actually performed
jopdorp Sep 18, 2026
c20752e
Pin the precondition the empty overwrite test is about
jopdorp Sep 18, 2026
0369a62
Reject deletes of files the table does not have
jopdorp Sep 18, 2026
807a268
Refresh the public API snapshot for OverwriteAction
jopdorp Sep 18, 2026
fed895f
Let a snapshot operation report the files it removed
jopdorp Sep 18, 2026
3fc4e80
Keep manifest names unique across a commit
jopdorp Sep 18, 2026
6325d22
Write a manifest under the schema and spec it was written with
jopdorp Sep 18, 2026
46c4336
Merge remote-tracking branch 'origin/main' into feat/overwrite-action
jopdorp Sep 29, 2026
1cad731
test(transaction): cover partial overwrite and per-file spec in snaps…
jopdorp Sep 29, 2026
7320fa4
Adapt the evolved-spec test to the UnboundPartitionField builder
jopdorp Sep 29, 2026
d5623e3
Drop the full-table truncation from the snapshot summary
jopdorp Oct 2, 2026
296532e
Omit a summary total that would go negative, as Java does
jopdorp Oct 2, 2026
eeff802
Name the removed-file fields and take the manifest spec by ref
jopdorp Oct 2, 2026
495f3ad
Take the added files again instead of cloning them for the summary
jopdorp Oct 2, 2026
96da179
Assert an operation reports exactly the files it marked deleted
jopdorp Oct 2, 2026
a5653bc
Say in the removed_data_files doc what it must match
jopdorp Oct 2, 2026
b194d10
Merge remote-tracking branch 'origin/main' into review-3253
jopdorp Oct 2, 2026
2977261
Summarize deleted files from the producer's list, as pyiceberg does
jopdorp Oct 2, 2026
f29655d
Merge branch 'snapshot-producer-removals' into feat/overwrite-action
jopdorp Oct 2, 2026
1bb452b
Collapse added and deleted files by path in the producer
jopdorp Oct 2, 2026
6331427
Rewrite only live entries and count deletes from the producer, as Jav…
jopdorp Oct 2, 2026
181f834
Fit the shared error on one line
jopdorp Oct 2, 2026
683fae4
Check that deletion summaries match manifest entries
jopdorp Oct 13, 2026
5f36938
Format dropped-source integer partition values
jopdorp Oct 13, 2026
543660f
Validate overwrite deletions before building their summary
jopdorp Oct 13, 2026
01303e1
Merge branch 'review-3253' into review-3300
jopdorp Oct 13, 2026
4eda47f
Merge remote-tracking branch 'origin/main' into feat/overwrite-action
jopdorp Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/iceberg/public-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3341,6 +3341,15 @@ pub fn iceberg::transaction::FastAppendAction::set_snapshot_properties(self, sna
pub fn iceberg::transaction::FastAppendAction::with_check_duplicate(self, v: bool) -> Self
impl core::clone::Clone for iceberg::transaction::FastAppendAction
pub fn iceberg::transaction::FastAppendAction::clone(&self) -> iceberg::transaction::FastAppendAction
pub struct iceberg::transaction::OverwriteAction
impl iceberg::transaction::OverwriteAction
pub fn iceberg::transaction::OverwriteAction::add_data_files(self, data_files: impl core::iter::traits::collect::IntoIterator<Item = iceberg::spec::DataFile>) -> Self
pub fn iceberg::transaction::OverwriteAction::delete_data_files(self, data_files: impl core::iter::traits::collect::IntoIterator<Item = iceberg::spec::DataFile>) -> Self
pub fn iceberg::transaction::OverwriteAction::set_commit_uuid(self, commit_uuid: uuid::Uuid) -> Self
pub fn iceberg::transaction::OverwriteAction::set_snapshot_properties(self, snapshot_properties: std::collections::hash::map::HashMap<alloc::string::String, alloc::string::String>) -> Self
pub fn iceberg::transaction::OverwriteAction::with_check_duplicate(self, v: bool) -> Self
impl core::clone::Clone for iceberg::transaction::OverwriteAction
pub fn iceberg::transaction::OverwriteAction::clone(&self) -> iceberg::transaction::OverwriteAction
pub struct iceberg::transaction::ReplaceSortOrderAction
impl iceberg::transaction::ReplaceSortOrderAction
pub fn iceberg::transaction::ReplaceSortOrderAction::asc(self, name: &str, null_order: iceberg::spec::NullOrder) -> Self
Expand All @@ -3355,6 +3364,7 @@ pub async fn iceberg::transaction::Transaction::commit(self, catalog: &dyn icebe
pub fn iceberg::transaction::Transaction::expire_snapshots(&self) -> iceberg::transaction::ExpireSnapshotsAction
pub fn iceberg::transaction::Transaction::fast_append(&self) -> iceberg::transaction::FastAppendAction
pub fn iceberg::transaction::Transaction::new(table: &iceberg::table::Table) -> Self
pub fn iceberg::transaction::Transaction::overwrite(&self) -> iceberg::transaction::OverwriteAction
pub fn iceberg::transaction::Transaction::replace_sort_order(&self) -> iceberg::transaction::ReplaceSortOrderAction
pub fn iceberg::transaction::Transaction::update_location(&self) -> iceberg::transaction::UpdateLocationAction
pub fn iceberg::transaction::Transaction::update_schema(&self) -> iceberg::transaction::UpdateSchemaAction
Expand Down
8 changes: 0 additions & 8 deletions crates/iceberg/src/spec/manifest/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,6 @@ impl ManifestWriter {
/// Add a delete manifest entry. This method will update following status of the entry:
/// - Update the entry status to `Deleted`
/// - Set the snapshot id to the current snapshot id
///
/// # TODO
/// Remove this allow later
#[allow(dead_code)]
pub(crate) fn add_delete_entry(&mut self, mut entry: ManifestEntry) -> Result<()> {
self.check_data_file(&entry.data_file)?;
entry.status = ManifestStatus::Deleted;
Expand Down Expand Up @@ -350,10 +346,6 @@ impl ManifestWriter {

/// Add an existing manifest entry. This method will update following status of the entry:
/// - Update the entry status to `Existing`
///
/// # TODO
/// Remove this allow later
#[allow(dead_code)]
pub(crate) fn add_existing_entry(&mut self, mut entry: ManifestEntry) -> Result<()> {
self.check_data_file(&entry.data_file)?;
entry.status = ManifestStatus::Existing;
Expand Down
16 changes: 2 additions & 14 deletions crates/iceberg/src/transaction/append.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use std::collections::{HashMap, HashSet};
use std::collections::HashMap;

use async_trait::async_trait;
use uuid::Uuid;
Expand Down Expand Up @@ -72,18 +72,6 @@ impl FastAppendAction {
self.snapshot_properties = snapshot_properties;
self
}

/// Collapse files sharing a path to their first occurrence, so a single
/// manifest never references the same file twice. Always runs (unlike the
/// `check_duplicate`-gated cross-snapshot check) since it is in-memory only.
fn dedupe_added_files(&self) -> Vec<DataFile> {
let mut seen = HashSet::with_capacity(self.added_data_files.len());
self.added_data_files
.iter()
.filter(|data_file| seen.insert(data_file.file_path.as_str()))
.cloned()
.collect()
}
}

#[async_trait]
Expand All @@ -99,7 +87,7 @@ impl TransactionAction for FastAppendAction {
table,
self.commit_uuid.unwrap_or_else(Uuid::now_v7),
self.snapshot_properties.clone(),
self.dedupe_added_files(),
self.added_data_files.clone(),
vec![],
);

Expand Down
7 changes: 7 additions & 0 deletions crates/iceberg/src/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ mod action;
pub use action::*;
mod append;
mod expire_snapshots;
mod overwrite;
mod snapshot;
mod sort_order;
mod update_location;
Expand All @@ -75,6 +76,7 @@ use crate::table::Table;
use crate::transaction::action::TransactionActionEntry;
pub use crate::transaction::append::FastAppendAction;
pub use crate::transaction::expire_snapshots::ExpireSnapshotsAction;
pub use crate::transaction::overwrite::OverwriteAction;
pub use crate::transaction::sort_order::ReplaceSortOrderAction;
pub use crate::transaction::update_location::UpdateLocationAction;
pub use crate::transaction::update_properties::UpdatePropertiesAction;
Expand Down Expand Up @@ -150,6 +152,11 @@ impl Transaction {
FastAppendAction::new()
}

/// Creates an overwrite action.
pub fn overwrite(&self) -> OverwriteAction {
OverwriteAction::new()
}

/// Creates replace sort order action.
pub fn replace_sort_order(&self) -> ReplaceSortOrderAction {
ReplaceSortOrderAction::new()
Expand Down
Loading
Loading