public class BinaryUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
truncateBinary(java.nio.ByteBuffer input,
int length)
Truncates the input byte buffer to the given length.
|
static Literal<java.nio.ByteBuffer> |
truncateBinaryMax(Literal<java.nio.ByteBuffer> input,
int length)
Returns a byte buffer whose length is lesser than or equal to truncateLength and is greater than the given input
|
static Literal<java.nio.ByteBuffer> |
truncateBinaryMin(Literal<java.nio.ByteBuffer> input,
int length)
Returns a byte buffer whose length is lesser than or equal to truncateLength and is lower than the given input
|
public static java.nio.ByteBuffer truncateBinary(java.nio.ByteBuffer input, int length)
We allow for a length of zero so that rows with empty string can be evaluated.
Partition specs still cannot be created with a length of zero due to a constraint
when parsing column truncation specs in org.apache.iceberg.MetricsModes
.
input
- The ByteBuffer to be truncatedlength
- The non-negative length to truncate input topublic static Literal<java.nio.ByteBuffer> truncateBinaryMin(Literal<java.nio.ByteBuffer> input, int length)