You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jduo (via GitHub)" <gi...@apache.org> on 2023/09/25 18:11:34 UTC

[GitHub] [arrow] jduo commented on a diff in pull request #37838: GH-37703: [Java] Method for setting exact number of records in ListVector

jduo commented on code in PR #37838:
URL: https://github.com/apache/arrow/pull/37838#discussion_r1336234136


##########
java/vector/src/test/java/org/apache/arrow/vector/TestListVector.java:
##########
@@ -1115,6 +1115,14 @@ public void testIsEmpty() {
     }
   }
 
+  @Test
+  public void testTotalCapacity() {
+    try (final ListVector vector = ListVector.empty("list", allocator)) {
+      vector.setInitialTotalCapacity(10, 100);
+      assertEquals(100, vector.getValueCapacity());

Review Comment:
   I revised the test as suggested in the comment that demonstrates use of allocateNewSafe().



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