Skip to content

refactor(spec): adopt SchemaId type alias everywhere - #3525

Open
dannycjones wants to merge 3 commits into
apache:mainfrom
dannycjones:refactor/schema-id-type-alias
Open

dannycjones wants to merge 3 commits into
apache:mainfrom
dannycjones:refactor/schema-id-type-alias

Conversation

@dannycjones

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Addresses part of #3524.

What changes are included in this PR?

This takes the existing SchemaId alias and adopts it where it wasn't already.

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.

Replace bare i32 with the existing SchemaId type alias wherever a value is a schema ID: TableMetadata/TableMetadataBuilder fields and methods, SchemaBuilder, TableUpdate::SetCurrentSchema/RemoveSchemas, and the schema, view version, table metadata and manifest metadata serde types. SchemaId is an alias for i32, so this is a type-spelling change only.

Co-authored-by: Danny C Jones <djonesoa@amazon.com>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes consistently substitute an equivalent type alias, with matching imports and public API updates and no identified blocking issues.

No open issues 🎉

What changed in this PR

Adopts the existing SchemaId alias across additional Iceberg metadata and catalog interfaces, advancing #3524 without changing the underlying i32 type or runtime behavior.

Changes:

  • Uses SchemaId in metadata fields, builders, serialization structures, and catalog updates.
  • Updates the public API inventory to reflect the aliased signatures.
File Description
crates/​iceberg/​src/​spec/​view_version.rs Uses the alias in view-version serialization.
crates/​iceberg/​src/​spec/​table_metadata.rs Applies the alias to schema maps and current-schema fields.
crates/​iceberg/​src/​spec/​table_metadata_builder.rs Uses the alias in schema tracking and builder methods.
crates/​iceberg/​src/​spec/​schema/​mod.rs Updates the schema builder field and setter.
crates/​iceberg/​src/​spec/​schema/​_serde.rs Uses the alias in serialized schema structures.
crates/​iceberg/​src/​spec/​manifest/​metadata.rs Applies the alias when parsing manifest schema IDs.
crates/​iceberg/​src/​catalog/​mod.rs Updates schema ID types in catalog operations.
crates/​iceberg/​public-api.txt Records the updated public signatures.

Review effort: Balanced

@dannycjones

Copy link
Copy Markdown
Contributor Author

Moving to draft so I can create PR for fixing CI.

@dannycjones
dannycjones marked this pull request as draft October 26, 2026 15:27
@dannycjones
dannycjones marked this pull request as ready for review October 26, 2026 18:26
@dannycjones
dannycjones marked this pull request as draft October 26, 2026 18:44
@dannycjones
dannycjones marked this pull request as ready for review October 27, 2026 09:42

This branch has not been deployed

No deployments
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