You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/05/18 16:24:10 UTC

[GitHub] [arrow] jacques-n commented on a change in pull request #7214: ARROW-8842: [Java] fix ListVector's setValueCount to set inner vector's value count correctly

jacques-n commented on a change in pull request #7214:
URL: https://github.com/apache/arrow/pull/7214#discussion_r426748450



##########
File path: java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
##########
@@ -844,7 +844,7 @@ public void setValueCount(int valueCount) {
     }
     /* valueCount for the data vector is the current end offset */
     final int childValueCount = (valueCount == 0) ? 0 :
-            offsetBuffer.getInt((lastSet + 1) * OFFSET_WIDTH);
+            offsetBuffer.getInt(valueCount * OFFSET_WIDTH);

Review comment:
       shouldn't this be (valueCount + 1) * OFFSET_WIDTH?




----------------------------------------------------------------
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.

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