mayuropensource commented on a change in pull request #11317:
URL: https://github.com/apache/arrow/pull/11317#discussion_r733651374



##########
File path: 
java/vector/src/test/java/org/apache/arrow/vector/util/TestVectorAppender.java
##########
@@ -96,6 +97,32 @@ public void testAppendFixedWidthVector() {
     }
   }
 
+  @Test
+  public void testAppendBitVector() {
+    final int length1 = 10;
+    final int length2 = 5;
+    try (BitVector target = new BitVector("", allocator);
+         BitVector delta = new BitVector("", allocator)) {
+
+      target.allocateNew(length1);
+      delta.allocateNew(length2);
+
+      ValueVectorDataPopulator.setVector(target, 0, 1, 0, 1, 0, 1, 0, null, 0, 
1);
+      ValueVectorDataPopulator.setVector(delta, null, 1, 1, 0, 0);
+
+      VectorAppender appender = new VectorAppender(target);
+      delta.accept(appender, null);
+
+      assertEquals(length1 + length2, target.getValueCount());
+
+      try (BitVector expected = new BitVector("expected", allocator)) {
+        expected.allocateNew();
+        ValueVectorDataPopulator.setVector(expected, 0, 1, 0, 1, 0, 1, 0, 
null, 0, 1, null, 1, 1, 0, 0);
+        assertVectorsEqual(expected, target);

Review comment:
       Could you call assertVectorValuesEquals() to check actual values?




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


Reply via email to