Skip to content

chore(refactor): add manifest list reader#2541

Open
xanderbailey wants to merge 11 commits into
apache:mainfrom
xanderbailey:xb/manifest-list-reader
Open

chore(refactor): add manifest list reader#2541
xanderbailey wants to merge 11 commits into
apache:mainfrom
xanderbailey:xb/manifest-list-reader

Conversation

@xanderbailey
Copy link
Copy Markdown
Contributor

@xanderbailey xanderbailey commented May 30, 2026

Which issue does this PR close?

Refactor required for PR which adds a ManifestListReader which mirrors the current ManifestListWriter. This will allow us to carry the encryption manager here also in the linked PR

  • Closes #.

What changes are included in this PR?

Adds a new public struct ManifestListReader which carries the things required to read a manifest list. Refactors call-sites to use this new struct and adds a deprecation for the old method.

Are these changes tested?

Comment thread crates/iceberg/src/spec/snapshot.rs Outdated
Copy link
Copy Markdown
Contributor

@blackmwk blackmwk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @xanderbailey for this pr!

Comment thread crates/iceberg/src/spec/manifest_list.rs Outdated
Comment thread crates/iceberg/src/catalog/utils.rs Outdated
let results: Vec<_> =
futures::future::try_join_all(metadata.snapshots().map(|snapshot| async {
let manifest_list = snapshot.load_manifest_list(io, metadata).await?;
let manifest_list = ManifestListReader::new(snapshot, io, metadata)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use table.manifest_list_reader method? This problem with new method is that we will need to do a lot of changes when adding a new parameter.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have access to a table directly in the catalog utils, do you think we should do a broader refactor here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we can, you can take a look at the call site of this method.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and we should make this method crate private, it should not be called by user directly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread crates/iceberg/src/io/object_cache.rs Outdated
}

impl<'a> ManifestListReader<'a> {
pub(crate) fn new(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can limit the visitilibyt to table module?

@xanderbailey xanderbailey force-pushed the xb/manifest-list-reader branch from f0d5779 to 7cb919b Compare June 1, 2026 10:34
@xanderbailey xanderbailey requested a review from blackmwk June 1, 2026 10:35
@xanderbailey xanderbailey force-pushed the xb/manifest-list-reader branch from b82caed to 978c244 Compare June 1, 2026 12:48
@xanderbailey xanderbailey force-pushed the xb/manifest-list-reader branch from ac55903 to 0449759 Compare June 1, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants