Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 980F1200B43 for ; Tue, 19 Jul 2016 22:46:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 95405160A76; Tue, 19 Jul 2016 20:46:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DC49A160A5C for ; Tue, 19 Jul 2016 22:46:42 +0200 (CEST) Received: (qmail 70126 invoked by uid 500); 19 Jul 2016 20:46:42 -0000 Mailing-List: contact commits-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list commits@arrow.apache.org Received: (qmail 70114 invoked by uid 99); 19 Jul 2016 20:46:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2016 20:46:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 00B2AE03A6; Tue, 19 Jul 2016 20:46:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smp@apache.org To: commits@arrow.apache.org Message-Id: <02edf7040d5f4fd0a9629122db51ea76@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: arrow git commit: ARROW-241: Add missing implementation for splitAndTransfer in UnionVector Date: Tue, 19 Jul 2016 20:46:42 +0000 (UTC) archived-at: Tue, 19 Jul 2016 20:46:43 -0000 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 Authored: Tue Jul 19 13:39:48 2016 -0700 Committer: Steven Phillips 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