rambleraptor commented on issue #143: URL: https://github.com/apache/terraform-provider-iceberg/issues/143#issuecomment-7326441311
iceberg-go [v0.8.0](https://github.com/apache/iceberg-go/releases/tag/v0.8.0) (2026-11-27) includes all three PRs above. Here is what each one replaces in the provider. | iceberg-go | Provider code | Status | |---|---|---| | [#2220](https://github.com/apache/iceberg-go/pull/2220) `table.RequirementsForUpdateTable` | `commitRequirements` (`table_commit_requirements.go`) | Replace | | [#2073](https://github.com/apache/iceberg-go/pull/2073) `iceberg.ReadCompatibilityErrors` | the body of `validateSchemaEvolution` and `validateFieldEvolution` | Replace | | [#2076](https://github.com/apache/iceberg-go/pull/2076) `iceberg.AssignFreshSchemaIDsWithBase` | `assignFieldIDs` / `resolveFieldIDs` | Keep for now, see below | ### Commit requirements `RequirementsForUpdateTable` is a port of Java's `UpdateRequirements.forUpdateTable`, and `commitRequirements` was a partial copy of the same logic. For the updates the provider sends, it produces the same requirements, with one difference: on an `add-spec` against a table with no `last-partition-id`, it asserts 999 (as Java does) instead of skipping the assert. It also covers the ref and remove-schema/remove-spec cases, so the provider won't have to add them later. ### Schema evolution The question to ask of a planned schema is whether it can read data written under the current one. That is `ReadCompatibilityErrors(planned, current)`, ported from Java's `CheckCompatibility`. For every change the old check already handled, it makes the same accept or reject decision; only the error wording changes (`data: long cannot be promoted to string`). It is stricter in two places: - **Adding a required column is now rejected** (`data is required, but is missing`). The old check let every addition through, but existing data files have no value for the new column. Java's `UpdateSchema` rejects the same change unless `allowIncompatibleChanges` is set. This covers the "required field without defaults" part of #112. A required column that has an `initial-default` would also be rejected, but the provider doesn't model defaults yet (#112), so nothing it can send today is affected. - List element and map value nullability get the same optional-to-required check as struct fields. ### Field ID assignment: keeping the provider's version `AssignFreshSchemaIDsWithBase` (Java's `TypeUtil.assignFreshIds`) assigns every ID itself, reusing an ID only when a field's full name matches one in the base schema. The provider lets users pin `id` in config, and the docs tell them to rename a column by keeping its `id`. A renamed field has a new name, so the library would give it a fresh ID. That turns the rename into a drop plus an add and loses the column's data. It would also ignore explicit IDs on new fields. `assignFieldIDs` / `resolveFieldIDs` stay until iceberg-go can keep IDs the caller has already assigned, for example through an option or by passing the field to `nextID`. That would be a separate upstream change. In plain Java there is no equivalent, because `UpdateSchema` never accepts IDs from the caller. ### Other changes the bump needs - `catalog.TableNameFromIdent` was removed (apache/iceberg-go#2281), so it becomes `catalog.ObjectNameFromIdent`. - `rest.WithAwsConfig` moved to `catalog/rest/sigv4.WithAWSConfig` when the SigV4 backend became optional (apache/iceberg-go#2060). - `iceberg.DecimalTypeOf` now returns an error. Only tests call it, and they switch to `MustDecimalTypeOf`. - New linked dependency `github.com/apache/datasketches-go`, which needs a `NOTICE-binary` entry. `LICENSE-binary` is regenerated with `dev/update_licenses.sh`. Possible follow-up, out of scope here: apache/iceberg-go#2547 moves the SigV4 signer's handling of an existing `Authorization` header into iceberg-go, relocating it to `Original-Authorization` as Java does. The provider does that itself in `sigv4Config.options`. The provider's version still works on v0.8.0 because it never sends an `Authorization` header to the signer, but it could be dropped. That needs testing against a real SigV4 endpoint, which the fixture can't do. -- 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]
