diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/LargeListViewVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/LargeListViewVector.java index 2faa4ae65088c..232236973943a 100644 --- a/java/vector/src/main/java/org/apache/arrow/vector/complex/LargeListViewVector.java +++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/LargeListViewVector.java @@ -500,8 +500,8 @@ public void splitAndTransfer(int startIndex, int length) { to.sizeBuffer = to.allocateBuffers((long) length * SIZE_WIDTH); /* splitAndTransfer the size buffer */ - int maxOffsetAndSizeSum = -1; - int minOffsetValue = -1; + int maxOffsetAndSizeSum = Integer.MIN_VALUE; + int minOffsetValue = Integer.MAX_VALUE; for (int i = 0; i < length; i++) { final int offsetValue = offsetBuffer.getInt((long) (startIndex + i) * OFFSET_WIDTH); final int sizeValue = sizeBuffer.getInt((long) (startIndex + i) * SIZE_WIDTH);