Repository navigation
refactor(spec): adopt ViewVersionId type alias everywhere - #3526
Open
dannycjones wants to merge 1 commit into
Open
dannycjones wants to merge 1 commit into
dannycjones wants to merge 1 commit into
Conversation
Replace bare i32 with the existing ViewVersionId type alias wherever a value is a view version ID: ViewMetadataBuilder methods and helpers, ViewVersion::with_version_id, ViewUpdate::SetCurrentViewVersion, INITIAL_VIEW_VERSION_ID and the view version serde type. ViewMetadataBuilder::last_added_version_id was typed as Option<SchemaId>; it holds a view version ID, so it is now Option<ViewVersionId>. Both aliases are i32, so this is a type-spelling change only. Co-authored-by: Danny C Jones <djonesoa@amazon.com>
dannycjones
marked this pull request as ready for review
October 30, 2026 13:35
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the ViewVersionId type-alias updates.
No open issues 🎉
What changed in this PR
This PR advances #3524 by consistently using the existing ViewVersionId alias across view metadata and catalog updates, without changing runtime behavior.
Changes:
- Replaces raw
i32view-version annotations withViewVersionId. - Corrects
last_added_version_idfromSchemaIdtoViewVersionId. - Updates the public API snapshot to match the signatures.
| File | Description |
|---|---|
crates/iceberg/src/spec/view_version.rs |
Uses the alias in the version setter and serialization struct. |
crates/iceberg/src/spec/view_metadata.rs |
Types the initial view-version ID with the alias. |
crates/iceberg/src/spec/view_metadata_builder.rs |
Aligns version tracking, helpers, and history filtering with the alias. |
crates/iceberg/src/catalog/mod.rs |
Uses the alias in the current-view-version update field. |
crates/iceberg/public-api.txt |
Records the updated public type annotations. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Addresses part of #3524.
What changes are included in this PR?
Adopt existing
ViewVersionIdalias where it wasn't already.Additionally, it corrects a mistake where a
SchemaIdalias was used in the wrong place.Are these changes tested?
N/A
AI Disclosure
LLM used for obvious reasons - this is just a lot of find and replace. :)
Owned and reviewed by me.