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

Inheriting the sequence number from manifest list when load manifest #286

Open
ZENOTME opened this issue Mar 19, 2024 · 3 comments
Open

Comments

@ZENOTME
Copy link
Contributor

ZENOTME commented Mar 19, 2024

ref: https://iceberg.apache.org/spec/#sequence-numbers

@viirya
Copy link
Member

viirya commented Mar 22, 2024

Hmm, I think we already make it inherited?

entry.inherit_data(self);

pub(crate) fn inherit_data(&mut self, snapshot_entry: &ManifestFile) {
if self.snapshot_id.is_none() {
self.snapshot_id = Some(snapshot_entry.added_snapshot_id);
}
if self.sequence_number.is_none()
&& (self.status == ManifestStatus::Added
|| snapshot_entry.sequence_number == INITIAL_SEQUENCE_NUMBER)
{
self.sequence_number = Some(snapshot_entry.sequence_number);
}
if self.file_sequence_number.is_none()
&& (self.status == ManifestStatus::Added
|| snapshot_entry.sequence_number == INITIAL_SEQUENCE_NUMBER)
{
self.file_sequence_number = Some(snapshot_entry.sequence_number);
}
}

@ZENOTME
Copy link
Contributor Author

ZENOTME commented Mar 22, 2024

Yes! Sorry, I didn't notice that before.

@ZENOTME
Copy link
Contributor Author

ZENOTME commented Mar 22, 2024

Seems there isn't an explicit test case for this. I can add it later.

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

No branches or pull requests

2 participants