Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions java/c/src/test/java/org/apache/arrow/c/RoundtripTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,42 @@ public void testVarCharVector() {
}
}

@Test
public void testEmptyVarCharVector() {
try (final VarCharVector vector = new VarCharVector("v", allocator)) {
vector.allocateNewSafe();
vector.setValueCount(0);
assertTrue(roundtrip(vector, VarCharVector.class));
}
}

@Test
public void testEmptyLargeVarCharVector() {
try (final LargeVarCharVector vector = new LargeVarCharVector("v", allocator)) {
vector.allocateNewSafe();
vector.setValueCount(0);
assertTrue(roundtrip(vector, LargeVarCharVector.class));
}
}

@Test
public void testEmptyVarBinaryVector() {
try (final VarBinaryVector vector = new VarBinaryVector("v", allocator)) {
vector.allocateNewSafe();
vector.setValueCount(0);
assertTrue(roundtrip(vector, VarBinaryVector.class));
}
}

@Test
public void testEmptyLargeVarBinaryVector() {
try (final LargeVarBinaryVector vector = new LargeVarBinaryVector("v", allocator)) {
vector.allocateNewSafe();
vector.setValueCount(0);
assertTrue(roundtrip(vector, LargeVarBinaryVector.class));
}
}

@Test
public void testLargeVarBinaryVector() {
try (final LargeVarBinaryVector vector = new LargeVarBinaryVector("", allocator)) {
Expand Down