vibhatha commented on code in PR #43686:
URL: https://github.com/apache/arrow/pull/43686#discussion_r1729051527
##########
java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueViewVector.java:
##########
@@ -304,38 +304,44 @@ public void setValueCount(int valueCount) {
while (valueCount > getOffsetBufferValueCapacity()) {
reallocateBuffers();
}
- final int childValueCount = valueCount == 0 ? 0 : getLengthOfChildVector();
+ final int childValueCount = valueCount == 0 ? 0 :
getMaxViewEndChildVector();
vector.setValueCount(childValueCount);
}
- protected int getLengthOfChildVector() {
+ /**
+ * Get the maximum view length of child vector This method deduces the
length by considering the
Review Comment:
I updated the docs, does it look okay?
##########
java/vector/src/main/java/org/apache/arrow/vector/complex/BaseRepeatedValueViewVector.java:
##########
@@ -304,38 +304,44 @@ public void setValueCount(int valueCount) {
while (valueCount > getOffsetBufferValueCapacity()) {
reallocateBuffers();
}
- final int childValueCount = valueCount == 0 ? 0 : getLengthOfChildVector();
+ final int childValueCount = valueCount == 0 ? 0 :
getMaxViewEndChildVector();
vector.setValueCount(childValueCount);
}
- protected int getLengthOfChildVector() {
+ /**
+ * Get the maximum view length of child vector This method deduces the
length by considering the
+ * condition i.e., 0 <= offsets[i] + size[i] <= length of the child array.
Review Comment:
Updated this as well.
--
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]