You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by sm...@apache.org on 2016/07/19 20:46:42 UTC

arrow git commit: ARROW-241: Add missing implementation for splitAndTransfer in UnionVector

Repository: arrow
Updated Branches:
  refs/heads/master 59e5f9806 -> a2fb756a4


ARROW-241: Add missing implementation for splitAndTransfer in UnionVector

Use simple implementation that actually just copies


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/a2fb756a
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/a2fb756a
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/a2fb756a

Branch: refs/heads/master
Commit: a2fb756a43441a72e10ae74fa0e483e01bc5917e
Parents: 59e5f98
Author: Steven Phillips <st...@dremio.com>
Authored: Tue Jul 19 13:39:48 2016 -0700
Committer: Steven Phillips <st...@dremio.com>
Committed: Tue Jul 19 13:45:04 2016 -0700

----------------------------------------------------------------------
 java/vector/src/main/codegen/templates/UnionVector.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/a2fb756a/java/vector/src/main/codegen/templates/UnionVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/codegen/templates/UnionVector.java b/java/vector/src/main/codegen/templates/UnionVector.java
index 6042a5b..4829448 100644
--- a/java/vector/src/main/codegen/templates/UnionVector.java
+++ b/java/vector/src/main/codegen/templates/UnionVector.java
@@ -264,7 +264,11 @@ public class UnionVector implements ValueVector {
 
     @Override
     public void splitAndTransfer(int startIndex, int length) {
-
+      to.allocateNew();
+      for (int i = 0; i < length; i++) {
+        to.copyFromSafe(startIndex + i, i, org.apache.arrow.vector.complex.UnionVector.this);
+      }
+      to.getMutator().setValueCount(length);
     }
 
     @Override