Skip to content

Commit

Permalink
feat: adding more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed Aug 12, 2024
1 parent e708ac9 commit 17fb552
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.arrow.memory.RootAllocator;
import org.apache.arrow.vector.complex.DenseUnionVector;
import org.apache.arrow.vector.complex.FixedSizeListVector;
import org.apache.arrow.vector.complex.LargeListViewVector;
import org.apache.arrow.vector.complex.ListVector;
import org.apache.arrow.vector.complex.MapVector;
import org.apache.arrow.vector.complex.StructVector;
Expand Down Expand Up @@ -852,6 +853,25 @@ public void testListVectorZeroStartIndexAndLength() {
}
}

@Test
public void testLargeListViewVectorZeroStartIndexAndLength() {
try (final LargeListViewVector listVector =
LargeListViewVector.empty("largelistview", allocator);
final LargeListViewVector newListVector = LargeListViewVector.empty("newList", allocator)) {

listVector.allocateNew();
final int valueCount = 0;
listVector.setValueCount(valueCount);

final TransferPair tp = listVector.makeTransferPair(newListVector);

tp.splitAndTransfer(0, 0);
assertEquals(valueCount, newListVector.getValueCount());

newListVector.clear();
}
}

@Test
public void testStructVectorZeroStartIndexAndLength() {
Map<String, String> metadata = new HashMap<>();
Expand Down

0 comments on commit 17fb552

Please sign in to comment.