Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support metadata table "history" #841

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rshkv
Copy link

@rshkv rshkv commented Dec 24, 2024

Re #823. Extends @xxchan's #822 to add support for the History metadata table. (I'll rebase and update this PR once #822 merges.)

The history table is the snapshot log with ancestry information.

Reference implementations:

Comment on lines +217 to +231
impl<'a> Iterator for Ancestors<'a> {
type Item = &'a SnapshotRef;

fn next(&mut self) -> Option<Self::Item> {
if let Some(snapshot) = self.current_snapshot {
self.current_snapshot = match snapshot.parent_snapshot_id() {
Some(parent_snapshot_id) => self.table_metadata.snapshot_by_id(parent_snapshot_id),
None => None,
};
Some(snapshot)
} else {
None
}
}
}
Copy link
Author

Choose a reason for hiding this comment

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

PyIceberg's ancestors_of is here

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