huaxingao commented on code in PR #14700:
URL: https://github.com/apache/iceberg/pull/14700#discussion_r2567511371


##########
core/src/main/java/org/apache/iceberg/rest/RESTUtil.java:
##########
@@ -271,4 +273,25 @@ public static String resolveEndpoint(String catalogUri, 
String endpointPath) {
   public static Map<String, String> configHeaders(Map<String, String> 
properties) {
     return RESTUtil.extractPrefixMap(properties, "header.");
   }
+
+  /**
+   * Generate a RFC 9562 UUIDv7 string.
+   *
+   * <p>Layout: - 48-bit Unix epoch milliseconds - 4-bit version (0b0111) - 
12-bit random (rand_a) -
+   * 2-bit variant (RFC 4122, 0b10) - 62-bit random (rand_b)
+   */
+  public static String generateUuidV7() {
+    long epochMs = System.currentTimeMillis() & 0xFFFFFFFFFFFFL; // 48 bits

Review Comment:
   Thanks for the pointer! I didn’t realize JDK 26 includes UUIDv7. I’ll 
compare my implementation with `UUID.ofEpochMillis`, and align as needed.



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