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


##########
core/src/main/java/org/apache/iceberg/data/IdentityPartitionConverters.java:
##########
@@ -48,6 +50,13 @@ public static Object convertConstant(Type type, Object 
value) {
       case FIXED:
         if (value instanceof GenericData.Fixed) {
           return ((GenericData.Fixed) value).bytes();
+        } else if (value instanceof ByteBuffer) {
+          return ((ByteBuffer) value).array();

Review Comment:
   Use  
   ```java
   ByteBuffers.toByteArray
   ```
   
https://github.com/apache/iceberg/blob/c07f2aabc0a1d02f068ecf1514d2479c0fbdd3b0/api/src/main/java/org/apache/iceberg/util/ByteBuffers.java#L27
   
   A safer option (same suggestion for UUID)



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