nssalian commented on code in PR #16880:
URL: https://github.com/apache/iceberg/pull/16880#discussion_r3444762792
##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantUtil.java:
##########
@@ -367,7 +367,7 @@ private static VariantValue truncateUpperBound(VariantValue
value) {
return truncatedString != null ? Variants.of(PhysicalType.STRING,
truncatedString) : null;
case BINARY:
ByteBuffer truncatedBuffer =
- BinaryUtil.truncateBinaryMin((ByteBuffer)
value.asPrimitive().get(), 16);
+ BinaryUtil.truncateBinaryMax((ByteBuffer)
value.asPrimitive().get(), 16);
Review Comment:
Now that BINARY uses truncateBinaryMax, the all-0xFF overflow case (returns
null) is reachable now. Worth a case with an all-0xFF value longer than 16
bytes asserting the upper bound is absent?
--
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]