Skip to content

Commit a25fad8

Browse files
fix(rewrite-manifests): migrate to ManifestListReader API
Snapshot::load_manifest_list was removed in #2541 in favor of Table::manifest_list_reader. Update production code and tests to match. Build was broken on the merge commit; this restores green CI.
1 parent c9a9c5b commit a25fad8

1 file changed

Lines changed: 11 additions & 27 deletions

File tree

crates/iceberg/src/transaction/rewrite_manifests.rs

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ impl TransactionAction for RewriteManifestsAction {
8888
let default_spec_id = metadata.default_partition_spec_id();
8989
let format_version = metadata.format_version();
9090

91-
let manifest_list = current_snapshot
92-
.load_manifest_list(table.file_io(), &table.metadata_ref())
93-
.await?;
91+
let manifest_list = table.manifest_list_reader(current_snapshot).load().await?;
9492

9593
let mut kept: Vec<ManifestFile> = Vec::new();
9694
let mut to_rewrite: Vec<ManifestFile> = Vec::new();
@@ -440,10 +438,8 @@ mod tests {
440438
assert!(seq_a < seq_b && seq_b < seq_c);
441439

442440
let pre_manifest_count = table
443-
.metadata()
444-
.current_snapshot()
445-
.unwrap()
446-
.load_manifest_list(table.file_io(), table.metadata())
441+
.manifest_list_reader(table.metadata().current_snapshot().unwrap())
442+
.load()
447443
.await
448444
.unwrap()
449445
.entries()
@@ -462,10 +458,7 @@ mod tests {
462458
let snapshot = table.metadata().current_snapshot().unwrap();
463459
assert_eq!(snapshot.summary().operation, Operation::Replace);
464460

465-
let post_list = snapshot
466-
.load_manifest_list(table.file_io(), table.metadata())
467-
.await
468-
.unwrap();
461+
let post_list = table.manifest_list_reader(snapshot).load().await.unwrap();
469462
let total_entries: usize = {
470463
let mut n = 0;
471464
for m in post_list.entries() {
@@ -517,10 +510,8 @@ mod tests {
517510
.unwrap();
518511

519512
let post_list = t
520-
.metadata()
521-
.current_snapshot()
522-
.unwrap()
523-
.load_manifest_list(t.file_io(), t.metadata())
513+
.manifest_list_reader(t.metadata().current_snapshot().unwrap())
514+
.load()
524515
.await
525516
.unwrap();
526517
assert!(
@@ -546,10 +537,8 @@ mod tests {
546537

547538
async fn collect(t: &Table) -> Vec<(String, Option<i64>, Option<i64>, Option<i64>)> {
548539
let list = t
549-
.metadata()
550-
.current_snapshot()
551-
.unwrap()
552-
.load_manifest_list(t.file_io(), t.metadata())
540+
.manifest_list_reader(t.metadata().current_snapshot().unwrap())
541+
.load()
553542
.await
554543
.unwrap();
555544
let mut v = Vec::new();
@@ -646,10 +635,8 @@ mod tests {
646635
.await
647636
.unwrap();
648637
let post_count = t
649-
.metadata()
650-
.current_snapshot()
651-
.unwrap()
652-
.load_manifest_list(t.file_io(), t.metadata())
638+
.manifest_list_reader(t.metadata().current_snapshot().unwrap())
639+
.load()
653640
.await
654641
.unwrap()
655642
.entries()
@@ -696,10 +683,7 @@ mod tests {
696683
assert_eq!(snap.sequence_number(), pre_seq + 1);
697684

698685
// Each output manifest's entries must all share the same partition tuple.
699-
let post_list = snap
700-
.load_manifest_list(table.file_io(), table.metadata())
701-
.await
702-
.unwrap();
686+
let post_list = table.manifest_list_reader(snap).load().await.unwrap();
703687
assert_eq!(
704688
post_list.entries().len(),
705689
2,

0 commit comments

Comments
 (0)