Fokko commented on PR #8050:
URL: https://github.com/apache/iceberg/pull/8050#issuecomment-1633787010

   > on the other side, there doesn't seem to be parsing exceptions from my 
experience, is that because the writer essentially always write out the 
optional field. in this sense, what is changed ? or it's just to stick more 
strictly with the spec?
   
   @zinking Thanks for the review. Let me elaborate. It is sticking to the spec 
on the read side. In the spec, the `current-snapshot-id`, `properties`, and 
`snapshots` fields can be omitted, but the parser doesn't allow this. 
   
   The Java code still writes a `-1` when writing a Metadata JSON:
   
   
https://github.com/apache/iceberg/blob/531bf9de69aac73b14bb6e7dccc0917da522c11c/core/src/main/java/org/apache/iceberg/TableMetadataParser.java#L216-L218
   
   But I don't want to change that today, since other readers might expect a -1 
instead of omitting the field (I know Athena does). I think aking sure that the 
read-side adheres to the spec is a good first step.


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