laskoviymishka opened a new issue, #1011: URL: https://github.com/apache/iceberg-go/issues/1011
Parent: #589 v3 spec: `initial-default` / `write-default` on struct/list/map fields must be null or a single-value-parseable JSON value. Java enforces this in `SchemaParser`; iceberg-go has rejection rules for `UnknownType` defaults but does not gate complex-type defaults the same way — non-null defaults on struct / list / map fields are silently accepted. Walk the schema during validation; for every nested-type field with a non-null default, validate that the default parses cleanly under the type's encoding rules (a JSON object for struct, JSON array for list, JSON object-of-pairs for map). Mirror the existing `UnknownType` default rejection's error-message style for consistency. Tests cover struct, list, and map separately (each a clear failure case + a passing null-default case), plus a primitive case to confirm primitive defaults still pass through unchanged. -- 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]
