laskoviymishka opened a new issue, #1002:
URL: https://github.com/apache/iceberg-go/issues/1002

   Parent: #589
   
   v3 metadata expects `"current-snapshot-id": null` when no snapshot exists, 
not the field omitted entirely (Java precedent: 
[apache/iceberg#12335](https://github.com/apache/iceberg/pull/12335)). The 
current marshaller uses an `omitempty` JSON tag on the `*int64` 
`CurrentSnapshotID` field, so when it's nil the key is dropped.
   
   For v3, emit explicit `null` instead. Cleanest shape is a custom 
`MarshalJSON` on the v3 metadata struct that writes the `current-snapshot-id` 
key with a literal `null` when the pointer is nil. v1/v2 omitempty behavior 
should stay (existing test fixtures use `-1` for the v1/v2 sentinel).
   
   Golden-fixture round-trip test against a Java-produced empty v3 
`metadata.json` pins the output shape.


-- 
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]

Reply via email to