vibhatha commented on code in PR #43686:
URL: https://github.com/apache/arrow/pull/43686#discussion_r1724761763
##########
java/vector/src/main/java/org/apache/arrow/vector/complex/BaseLargeRepeatedValueViewVector.java:
##########
@@ -311,17 +311,14 @@ public void setValueCount(int valueCount) {
protected int getLengthOfChildVector() {
int maxOffsetSizeSum = offsetBuffer.getInt(0) + sizeBuffer.getInt(0);
- int minOffset = offsetBuffer.getInt(0);
for (int i = 0; i < valueCount; i++) {
int currentOffset = offsetBuffer.getInt((long) i * OFFSET_WIDTH);
int currentSize = sizeBuffer.getInt((long) i * SIZE_WIDTH);
int currentSum = currentOffset + currentSize;
-
maxOffsetSizeSum = Math.max(maxOffsetSizeSum, currentSum);
- minOffset = Math.min(minOffset, currentOffset);
}
- return maxOffsetSizeSum - minOffset;
+ return maxOffsetSizeSum;
Review Comment:
@lidavidm what I have done in the first implementation is incorrect, I think
the test case I had didn't tackle this case, but the C data interface tests
caught it. Sorry about that.
--
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]