Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-41609: [Java] Initialize non empty offset buffer for variable-size layout before exporting #41610

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 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,38 @@ public void testVarCharVector() {
}
}

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

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

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

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

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