Skip to content

Commit

Permalink
Remove unused truncate binary internal
Browse files Browse the repository at this point in the history
  • Loading branch information
kbendick committed Jul 26, 2022
1 parent f81e780 commit 0f5c8f8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions api/src/main/java/org/apache/iceberg/util/BinaryUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ public static ByteBuffer truncateBinary(ByteBuffer input, int length) {
return ByteBuffer.wrap(array);
}

public static ByteBuffer truncateBinaryInternal(ByteBuffer input, int length) {
if (length == 0) {
return EMPTY_BYTE_BUFFER;
} else if (length >= input.remaining()) {
return input;
}
byte[] array = new byte[length];
input.duplicate().get(array);
return ByteBuffer.wrap(array);
}

/**
* Returns a byte buffer whose length is lesser than or equal to truncateLength and is lower than the given input
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static long truncateLong(int width, long value) {
return value - (((value % width) + width) % width);
}

public static BigDecimal truncateDecimal(BigInteger unscaledWidth, BigDecimal value) {ßßß
public static BigDecimal truncateDecimal(BigInteger unscaledWidth, BigDecimal value) {
BigDecimal remainder = new BigDecimal(
value.unscaledValue()
.remainder(unscaledWidth)
Expand Down

0 comments on commit 0f5c8f8

Please sign in to comment.