RussellSpitzer commented on code in PR #12334:
URL: https://github.com/apache/iceberg/pull/12334#discussion_r1961967419


##########
format/spec.md:
##########
@@ -1754,6 +1754,10 @@ Snapshot summary can include metrics fields to track 
numeric stats of the snapsh
 | **`engine-name`**        | "spark"    | Name of the engine that created the 
snapshot                    |
 | **`engine-version`**     | "3.5.4"    | Version of the engine that created 
the snapshot                 |
 
+### Encoding of `current-snapshot-id`
+
+For the Java implementation, `-1` has meant "no current snapshot" in the past 
and is equivalent to missing/null. However, this has never been formalized in 
the spec. When reading this field, accept `-1` as `null`. For Java, ≥V3 
metadata will write `null` instead of `-1` in the case there is no current 
snapshot.

Review Comment:
   ```suggestion
   The Java implementation writes `-1` for  "no current snapshot" with V1 and 
V2 tables and considers this equivalent to missing/null. This has never been 
formalized in the spec but for compatibility other implementations can accept 
`-1` as `null`. The Java implementation will no longer write `-1` and will use 
null for "no current snapshot for all tables with a version greater than or 
equal to V3
   ```
   
   Just reworded things a bit but feel free to ignore.
   



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to