rdblue commented on code in PR #14101:
URL: https://github.com/apache/iceberg/pull/14101#discussion_r2830551138
##########
api/src/main/java/org/apache/iceberg/expressions/SerializationProxies.java:
##########
@@ -81,4 +82,19 @@ protected byte[] bytes() {
return bytes;
}
}
+
+ static class BoundingBoxLiteralProxy extends FixedLiteralProxy {
+ /** Constructor for Java serialization. */
+ BoundingBoxLiteralProxy() {}
+
+ BoundingBoxLiteralProxy(ByteBuffer buffer) {
+ super(buffer);
+ }
+
+ @Override
+ Object readResolve() throws ObjectStreamException {
+ return new Literals.BoundingBoxLiteral(
+ ByteBuffer.wrap(bytes()).order(ByteOrder.LITTLE_ENDIAN));
Review Comment:
By setting `order`, this changes the buffer that was serialized. I think
that the expression code should leave the byte order alone and the
`BoundingBox` serialization and deserialization should handle it. That
serialization should also be duplicating the `ByteBuffer` anyway because it
should not be consuming or changing the incoming buffer.
--
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]