Revanth14 opened a new pull request, #1871: URL: https://github.com/apache/iceberg-go/pull/1871
### Description Validate required snapshot fields during JSON decoding: - Reject missing or null `snapshot-id`. - Reject missing or null `timestamp-ms`. - Reject null snapshot entries. - Return errors wrapping `table.ErrInvalidMetadata`. - Preserve explicit zero values and leave the receiver unchanged on failure. The validation also propagates through table metadata and `add-snapshot` decoding. ### Why? Previously, malformed snapshots silently decoded missing IDs and timestamps as `0`. This could create invalid snapshot identities and Unix-epoch timestamps. Both fields are required by the Iceberg specification, and Java rejects them when missing or null. ### Tests Added coverage for missing, null, and explicit-zero values, null snapshots, metadata parsing, and receiver preservation. Validated with: - `go test ./... -count=1` - `go vet -tags=integration ./...` - `golangci-lint run ./table/...` Closes #1869 -- 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]
