Skip to content

Add method and property around sequence-numbers#60

Merged
Fokko merged 2 commits intomainfrom
fd-add-methods-sequence-numbers
Oct 11, 2023
Merged

Add method and property around sequence-numbers#60
Fokko merged 2 commits intomainfrom
fd-add-methods-sequence-numbers

Conversation

@Fokko
Copy link
Copy Markdown
Contributor

@Fokko Fokko commented Oct 11, 2023

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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