Skip to content

Conversation

@geruh
Copy link
Contributor

@geruh geruh commented Oct 17, 2025

Rationale for this change

This PR Adds first-row-id and added-rows fields to the Snapshot class to align with Java Iceberg's v3 table format. I know we are very limited with support in Pyiceberg but recently I've been testing out the v3 tables created in java and python is a good way to inspect the changes.

Are these changes tested?

yes added some unit test

Are there any user-facing changes?

additions to see some of the snapshot data from v3 tables

@rambleraptor
Copy link
Contributor

Thanks so much for adding this! I've actually got #2129 that handles that same functionality.

Comment on lines +260 to +262
@field_validator("first_row_id")
@classmethod
def validate_first_row_id(cls, v: Optional[int]) -> Optional[int]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Pydantic also allows for annotating with PositiveInt which will do these checks internally: https://docs.pydantic.dev/2.3/api/types/#pydantic.types.PositiveInt

@Fokko Fokko mentioned this pull request Oct 21, 2025
@Fokko
Copy link
Contributor

Fokko commented Oct 22, 2025

@geruh Sorry, I'm going to close this one now #2129 has been merged. Feel free to create a PR for improvements 👍

@Fokko Fokko closed this Oct 22, 2025
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