deniskuzZ commented on code in PR #15384:
URL: https://github.com/apache/iceberg/pull/15384#discussion_r2845580883
##########
api/src/main/java/org/apache/iceberg/expressions/InclusiveMetricsEvaluator.java:
##########
@@ -632,6 +633,8 @@ private boolean isNonNullPreserving(Bound<?> term) {
}
private static VariantObject parseBounds(ByteBuffer buffer) {
- return Variant.from(buffer).value().asObject();
+ // Explicitly use little-endian encoding for reading buffer
+ ByteBuffer littleEndian =
buffer.duplicate().order(ByteOrder.LITTLE_ENDIAN);
Review Comment:
In my opinion, we should store the variant buffer in lowerBounds/upperBounds
using the proper encoding, rather than applying the encoding later in
parseBounds.
At the same time i can see similar pattern used in a project
````
ByteBuffer tmp = buffer.duplicate();
tmp.order(ByteOrder.LITTLE_ENDIAN);
````
--
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]