Skip to content

Commit a2fb756

Browse files
ARROW-241: Add missing implementation for splitAndTransfer in UnionVector
Use simple implementation that actually just copies
1 parent 59e5f98 commit a2fb756

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

java/vector/src/main/codegen/templates/UnionVector.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,11 @@ public void transfer() {
264264
265265
@Override
266266
public void splitAndTransfer(int startIndex, int length) {
267-
267+
to.allocateNew();
268+
for (int i = 0; i < length; i++) {
269+
to.copyFromSafe(startIndex + i, i, org.apache.arrow.vector.complex.UnionVector.this);
270+
}
271+
to.getMutator().setValueCount(length);
268272
}
269273
270274
@Override

0 commit comments

Comments
 (0)