Kontinuation commented on code in PR #14101:
URL: https://github.com/apache/iceberg/pull/14101#discussion_r2706671033
##########
api/src/main/java/org/apache/iceberg/expressions/Literals.java:
##########
@@ -719,4 +722,70 @@ public String toString() {
return "X'" + BaseEncoding.base16().encode(bytes) + "'";
}
}
+
+ static class BoundingBoxLiteral implements Literal<ByteBuffer> {
+ private static final Comparator<ByteBuffer> CMP =
+
Comparators.<ByteBuffer>nullsFirst().thenComparing(Comparators.unsignedBytes());
+
+ private final ByteBuffer value;
+
+ BoundingBoxLiteral(BoundingBox value) {
+ this.value = value.toByteBuffer();
+ }
+
+ BoundingBoxLiteral(ByteBuffer value) {
+ this.value = value;
Review Comment:
Normalized the ByteBuffer in this constructor. Actually this constructor is
only called by `BoundingBoxLiteralProxy`. The ByteBuffer passed into it always
has position=0 and byteOrder=LITTLE_ENDIAN. We do this normalization to guard
future usages of this constructor.
--
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]