joyhaldar commented on code in PR #17482:
URL: https://github.com/apache/iceberg/pull/17482#discussion_r3704278788


##########
spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/data/InternalRowConverter.java:
##########
@@ -112,4 +106,12 @@ private static Object convert(Type type, Object value) {
               "Unsupported type for conversion to InternalRow: " + type);
     };
   }
+
+  private static byte[] toByteArray(Object value) {
+    if (value instanceof byte[]) {
+      return (byte[]) value;
+    }
+
+    return ByteBuffers.toByteArray((ByteBuffer) value);

Review Comment:
   Thank you for your review @pvary. Went with the second option. Updated 
across all three Spark versions.



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