abhishek593 commented on code in PR #16004:
URL: https://github.com/apache/iceberg/pull/16004#discussion_r3247062506
##########
api/src/main/java/org/apache/iceberg/util/UUIDUtil.java:
##########
@@ -82,6 +82,87 @@ public static ByteBuffer convertToByteBuffer(UUID value,
ByteBuffer reuse) {
return buffer;
}
+ /**
+ * Convert the ASCII bytes of a UUID string directly to a 16-byte {@link
ByteBuffer}, without
+ * creating an intermediate {@link UUID} object.
+ *
+ * @param uuidBytes ASCII bytes of a UUID in canonical form ({@code
+ * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, 36 bytes)
+ * @return a newly allocated ByteBuffer containing the 16-byte UUID
+ */
+ public static ByteBuffer convertToByteBuffer(byte[] uuidBytes) {
+ return convertToByteBuffer(uuidBytes, null);
+ }
+
+ /**
+ * Convert the ASCII bytes of a UUID string directly to a 16-byte {@link
ByteBuffer}, without
+ * creating an intermediate {@link UUID} object.
+ *
+ * @param uuidBytes ASCII bytes of a UUID in canonical form ({@code
+ * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, 36 bytes)
+ * @param reuse a ByteBuffer to reuse, or null to allocate a new one
+ * @return the reuse buffer (or a new one) containing the 16-byte UUID
+ */
+ public static ByteBuffer convertToByteBuffer(byte[] uuidBytes, ByteBuffer
reuse) {
+ Preconditions.checkArgument(
Review Comment:
@steveloughran, can you share the next steps for getting this merged?
--
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]