⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@aditya-subrahmanyan
Copy link
Contributor

Which issue does this PR close?

What changes are included in this PR?

Implements Iceberg spec requirement to reuse partition field IDs when adding specs with equivalent fields (same source_id + transform).

  • Add Hash trait to Transform enum for HashMap keys
  • Add field ID reuse logic in TableMetadataBuilder.add_partition_spec()

Are these changes tested?

Added a test to cover partition field id reuse when new specs are added

@aditya-subrahmanyan aditya-subrahmanyan marked this pull request as ready for review January 11, 2026 20:00
@aditya-subrahmanyan
Copy link
Contributor Author

Hi @liurenjie1024 , could you please review this PR? Thanks!

&self,
unbound_spec: UnboundPartitionSpec,
) -> Result<UnboundPartitionSpec> {
use std::collections::HashMap;

Choose a reason for hiding this comment

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

can we have this import above (following convention in other places of file)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not even sure why I added this here, it's already imported at the top of this file. Updating PR to remove it.

@aditya-subrahmanyan aditya-subrahmanyan force-pushed the adityasn/add-spec-partition-field-reuse branch from db0ea04 to e903576 Compare January 15, 2026 04:22
Implements Iceberg spec requirement to reuse partition field IDs when
adding specs with equivalent fields (same source_id + transform).

- Add Hash trait to Transform enum for HashMap keys
- Add field ID reuse logic in TableMetadataBuilder.add_partition_spec()
- Add test for multi-spec field ID reuse scenarios
@aditya-subrahmanyan aditya-subrahmanyan force-pushed the adityasn/add-spec-partition-field-reuse branch from e903576 to e3d2cc3 Compare January 16, 2026 17:58
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.

TableUpdate::AddSpec does not reuse partition field IDs across specs

2 participants