ebyhr commented on code in PR #14720:
URL: https://github.com/apache/iceberg/pull/14720#discussion_r2575143106


##########
format/spec.md:
##########
@@ -1827,7 +1827,7 @@ Snapshot summary can include metrics fields to track 
numeric stats of the snapsh
 
 Writers should produce positive values for snapshot ids in a manner that 
minimizes the probability of id collisions and should verify the id does not 
conflict with existing snapshots. Producing snapshot ids based on timestamps 
alone is not recommended as it increases the potential for collisions.
 
-The reference Java implementation uses a type 4 uuid and XORs the 4 most 
significant bytes with the 4 least significant bytes then ANDs with the maximum 
long value to arrive at a pseudo-random snapshot id with a low probability of 
collision.
+The reference Java implementation uses a type 4 uuid and XORs the 8 most 
significant bytes with the 8 least significant bytes then ANDs with the maximum 
long value to arrive at a pseudo-random snapshot id with a low probability of 
collision.

Review Comment:
   FYI for other reviewers:
   
https://github.com/apache/iceberg/blob/f3949cea069abd9339a150e6e8df8b90ee9f6675/core/src/main/java/org/apache/iceberg/SnapshotIdGeneratorUtil.java#L32-L36
   
   The relevant javadoc of UUID: 
   > public long getMostSignificantBits(): Returns the most significant 64 bits 
of this UUID's 128 bit value.
   > public long getLeastSignificantBits(): Returns the least significant 64 
bits of this UUID's 128 bit value.
   



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