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

Add method and property around sequence-numbers #60

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Looks good to me once the linter is passing!

@amogh-jahagirdar
Copy link
Contributor

amogh-jahagirdar commented Oct 11, 2023

Also seems like a few of these APIs are missing like last updated time, last column id, uuid. I can put out a PR to bring this to parity.

@amogh-jahagirdar
Copy link
Contributor

Actually nvm on the new APIs, I was confusing with TableMetadata. I do think having table.uuid() would be useful, that came up recently internally. I'll propose that in the Java library first though to see the community's thoughts.

@Fokko
Copy link
Contributor Author

Fokko commented Oct 11, 2023

@amogh-jahagirdar thanks for the review, appreciate it.

I'm adding them once we start using them, but if you see anything missing that would be useful on its own, feel free to raise a PR

@Fokko Fokko merged commit 7a39192 into main Oct 11, 2023
@Fokko Fokko deleted the fd-add-methods-sequence-numbers branch October 11, 2023 12:11
def last_sequence_number(self) -> int:
return self.metadata.last_sequence_number

def next_sequence_number(self) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: In Java, this is on TableMetadata, which is an internal class and not part of the public API. I don't think anyone would call this externally, but if they did it may not be accurate because the sequence number could be reassigned for a new snapshot if the commit needs to be retried. I'd probably make this _next_sequence_number() to avoid that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, I'll add this to #23

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.

3 participants