laskoviymishka commented on code in PR #2475: URL: https://github.com/apache/iceberg-go/pull/2475#discussion_r4537063487
########## website/src/releases.md: ########## @@ -42,6 +42,8 @@ Per-release notes (highlights, breaking changes, contributors) are published on ### Unreleased compatibility notes +- **Table creation rejects duplicate field IDs.** `CreateTable` and `NewMetadata` now return `ErrInvalidSchema` when two fields in the schema share an ID, including unset `0` or `-1` IDs, even for unpartitioned, unsorted tables. Before, the partition spec or sort order could bind to the wrong column. Callers should assign unique IDs (or let the schema be built with fresh IDs). This matches Java, whose `Schema` constructor rejects duplicate IDs. Review Comment: REST `CreateTable` posts the schema to the server and never calls `NewMetadata` ([rest.go](https://github.com/apache/iceberg-go/blob/3dfb417acf4006d92c41a0dd573e796550f9e7e9/catalog/rest/rest.go#L1663-L1700)), so for REST nothing changes on the client. Could the note scope this to catalogs that build metadata through `NewMetadata`? ```suggestion - **Table creation rejects duplicate field IDs.** `NewMetadata`, and `CreateTable` on catalogs that build metadata through it (not REST), now return `ErrInvalidSchema` when two fields in the schema share an ID, including unset `0` or `-1` IDs, even for unpartitioned, unsorted tables. Before, the partition spec or sort order could bind to the wrong column. Callers should assign unique IDs (or let the schema be built with fresh IDs). This matches Java, whose `Schema` constructor rejects duplicate IDs. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
