cashmand commented on code in PR #3117:
URL: https://github.com/apache/parquet-java/pull/3117#discussion_r1955076733


##########
parquet-variant/src/main/java/org/apache/parquet/variant/Variant.java:
##########
@@ -129,8 +130,11 @@ public byte[] getBinary() {
   /**
    * @return the UUID value
    */
-  public byte[] getUUID() {
-    return VariantUtil.getUUID(value, pos);
+  public UUID getUUID() {
+    byte[] uuidBytes = VariantUtil.getUUID(value, pos);

Review Comment:
   Is there any benefit to having the internal method return an array of bytes? 
If you do it in `VariantUtil.getUuid`, I think you can directly construct the 
byte buffer as `ByteBuffer.wrap(value, start, 
UUID_SIZE).order(ByteOrder.BIG_ENDIAN);`, and avoid an array copy, plus make 
the util and public interface more consistent.



-- 
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...@parquet.apache.org

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


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

Reply via email to