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

spec: Add missing property in Snapshot #41

Closed
wants to merge 1 commit into from

Conversation

Aitozi
Copy link
Contributor

@Aitozi Aitozi commented Aug 5, 2024

Some fields in Snapshot are lost, add them back

/// Impl Reference: <https://github.com/apache/paimon/blob/release-0.8.2/paimon-core/src/main/java/org/apache/paimon/Snapshot.java#L506>.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum CommitKind {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Aitozi We do not need this enum, you can refer #11.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @QuakeWang I think that just means log_offsets ?

@@ -39,6 +39,16 @@ pub struct Snapshot {
#[builder(default = None)]
index_manifest: Option<String>,
commit_user: String,
// Mainly for snapshot deduplication.
//
// If multiple snapshots have the same commitIdentifier, reading from any of these snapshots
Copy link
Contributor Author

@Aitozi Aitozi Aug 5, 2024

Choose a reason for hiding this comment

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

I have a question out of this PR. Currently, the overwrite (expire partition) share the same commit identifier with the current snapshots's commit identifier. So I think this comments may not right ? CC @JingsongLi

@QuakeWang
Copy link
Contributor

It's my bad, when add the snapshot lost these field. Maybe I can add these in #39 with some tests. What do you think of this?

@Aitozi
Copy link
Contributor Author

Aitozi commented Aug 6, 2024

@QuakeWang Sure, thanks.

@Aitozi Aitozi closed this Aug 6, 2024
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