You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2025/01/24 07:25:15 UTC

Re: [PR] GH-470: ListViewVector#getElementEndIndex should returns size not index [arrow-java]

wgtmac commented on code in PR #554:
URL: https://github.com/apache/arrow-java/pull/554#discussion_r1928213952


##########
vector/src/main/java/org/apache/arrow/vector/complex/ListViewVector.java:
##########
@@ -956,7 +956,7 @@ public int getElementStartIndex(int index) {
 
   @Override
   public int getElementEndIndex(int index) {
-    return sizeBuffer.getInt(index * OFFSET_WIDTH);
+    return offsetBuffer.getInt((index + 1) * OFFSET_WIDTH);

Review Comment:
   Should line 954 be changed together? BTW, are these methods covered by any unit test?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org