badalprasadsingh commented on code in PR #2585:
URL: https://github.com/apache/iceberg-go/pull/2585#discussion_r4614588149
##########
website/src/releases.md:
##########
@@ -51,6 +51,7 @@ Per-release notes (highlights, breaking changes,
contributors) are published on
- **Float and double literal comparators use Iceberg ordering.**
`TypedLiteral.Comparator()` now orders `-0.0` before `+0.0` and NaN after all
other values; NaN compares equal to NaN. Callers that use these public
comparators may see a different order or equality result.
- **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.
- **Struct defaults must be empty objects.** Non-null `initial-default` and
`write-default` values for struct fields must be `{}`; defaults for nested
fields belong on those fields. Tables with populated struct defaults written by
older iceberg-go versions still load, but `AddSchema` validates the entire
resulting schema. Any schema update, including one that changes an unrelated
column, will fail until the populated default is cleared.
+- **Schemas with duplicate field IDs are rejected.** Table and view metadata
now fail to load with `ErrInvalidSchema` if any schema in their history has two
fields sharing an ID, including `0` or `-1`; Java Iceberg already rejects
these. Older releases could write such schemas through SQL `CreateView` or
`UpdateView`, or through `CommitTable` with `NewAddSchemaUpdate` on non-REST
catalogs, when IDs were left unset; these calls now return `ErrInvalidSchema`
instead. To recover, drop and recreate an affected view. For a table, point the
catalog at a copy of the metadata without that schema through an atomic catalog
metadata replacement, instead of editing the currently referenced metadata file
in place.
Review Comment:
nit: `UpdateView` was never released -> it is new since v0.7.0) amd
"view.CreateView" and "view.NewMetadata" also wrote such views in v0.7.0
```md
Older releases could write such schemas through SQL `CreateView`,
`view.CreateView` or `view.NewMetadata`, or through `CommitTable` with
`NewAddSchemaUpdate` on non-REST catalogs, when IDs were left unset; these
calls, and the new `UpdateView`, now return `ErrInvalidSchema` instead.
```
--
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]