rdblue commented on code in PR #17260:
URL: https://github.com/apache/iceberg/pull/17260#discussion_r3599457929


##########
core/src/main/java/org/apache/iceberg/variants/PrimitiveWrapper.java:
##########
@@ -57,7 +59,9 @@ class PrimitiveWrapper<T> implements VariantPrimitive<T> {
 
   private final PhysicalType type;
   private final T value;
-  private ByteBuffer buffer = null;
+  // binary values are held as a serializable byte array rather than a 
non-serializable ByteBuffer
+  private final byte[] binary;
+  private transient ByteBuffer buffer = null;

Review Comment:
   The only change needed for primitives was to track binary values using a 
`byte[]` instead of the `ByteBuffer`. This is consistent with how we handle 
`Serializable` in other classes that have binary data.



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