zeroshade commented on code in PR #2687: URL: https://github.com/apache/iceberg-go/pull/2687#discussion_r4805575906
########## website/src/releases.md: ########## @@ -60,6 +60,7 @@ Per-release notes (highlights, breaking changes, contributors) are published on - **Year partition paths are zero-padded to four digits.** `YearTransform.ToHumanString` now formats years below 1000 with leading zeros, as Java and PyIceberg do, so `0001-01-01` lands in `ts_year=0001/` instead of `ts_year=1/`. New files for such partitions are written to a different directory than earlier iceberg-go releases used. Reads are unaffected because partition values come from manifests, not paths. Tooling that matches on partition paths should use the padded form. - **Third-party types in the exported API follow iceberg-go's major version.** At v1, the exported API still uses arrow-go v18 (`table`, `table/inspect`, and the decimal and variant types), `aws.Config`, `oauth2.TokenSource`, the gocloud.dev `*blob.Bucket` in `blobfs.New`, the OpenTelemetry `metric.Meter`, and the gohive Thrift structs in `hive.HiveClient`. If any of them has to move to a new major version, iceberg-go moves to a new major version too. `golang.org/x/oauth2` and gocloud.dev are still pre-v1, and a breaking change there is treated the same way. - **Writes reject nulls in required fields.** `Append`, `AppendTable`, `Overwrite`, `WriteRecords`, copy-on-write `Delete`, `RewriteDataFiles` and equality delete writes now return an error wrapping `iceberg.ErrInvalidArgument` when a required field holds a null under non-null parents. Before, the null was written as the type's zero value, such as `0` or `""`, and the file metrics reported no nulls. Nullable Arrow fields that hold no nulls are still accepted. A rewrite also fails when it reads a file that holds nulls in a column made required later with `allowIncompatibleChanges`. Make that column optional again before rewriting such files. +- **Parquet files with only some field IDs are read by ID only.** A scan now resolves a data file by its field IDs when any field at any depth has one, and does not apply `schema.name-mapping.default` to it. A field without an ID, a list without an element ID and a map without a key or value ID are treated as not present in the file, together with everything nested in them, so they read as null unless the partition value or an `initial-default` applies. Previously, once a projected field had no ID, the projection was resolved through the name mapping, and a list or map without child IDs failed the scan with `ErrInvalidSchema`. `AddDataFilesByPath` now returns `ErrInvalidSchema` for such a file. Files with all field IDs or with none are read and added as before. Review Comment: Could this note cover two effects on tables that already contain such files? - **Filter pruning:** files registered by path before this change keep their name-keyed metrics. A predicate like `col IS NULL` can now prune such a file on "no nulls" stats while a scan reads that column as null, so filtered and unfiltered reads disagree. Removing and re-adding those files (or rewriting them first) fixes it. - **Rewrites make it permanent:** a copy-on-write delete or compaction of such a file now writes the absent columns as null, where the name mapping used to preserve their values. Users who want the old values should fix those files before rewriting them. -- 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]
