arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [6/6] arrow git commit: ARROW-1112: [JAVA] Set lastSet for VarLength and List vectors when loading
Date Thu, 08 Jun 2017 22:00:06 GMT
ARROW-1112: [JAVA] Set lastSet for VarLength and List vectors when loading

Closes #748


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

Branch: refs/heads/master
Commit: 037d78ddac31550e62a5c4463cc5611b0be71497
Parents: 68b2cc6
Author: Steven Phillips <steven@dremio.com>
Authored: Tue Jun 6 15:19:42 2017 -0700
Committer: Steven Phillips <steven@dremio.com>
Committed: Thu Jun 8 14:58:16 2017 -0700

----------------------------------------------------------------------
 java/vector/src/main/codegen/templates/NullableValueVectors.java    | 1 +
 .../src/main/java/org/apache/arrow/vector/complex/ListVector.java   | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/037d78dd/java/vector/src/main/codegen/templates/NullableValueVectors.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/codegen/templates/NullableValueVectors.java b/java/vector/src/main/codegen/templates/NullableValueVectors.java
index 4aa0076..092097b 100644
--- a/java/vector/src/main/codegen/templates/NullableValueVectors.java
+++ b/java/vector/src/main/codegen/templates/NullableValueVectors.java
@@ -143,6 +143,7 @@ public final class ${className} extends BaseDataValueVector implements
<#if type
     org.apache.arrow.vector.BaseDataValueVector.truncateBufferBasedOnSize(ownBuffers, 1,
         values.offsetVector.getBufferSizeFor(
         fieldNode.getLength() == 0? 0 : fieldNode.getLength() + 1));
+    mutator.lastSet = fieldNode.getLength() - 1;
     <#else>
     // fixed width values truncate value vector to size (#1)
     org.apache.arrow.vector.BaseDataValueVector.truncateBufferBasedOnSize(ownBuffers, 1,
values.getBufferSizeFor(fieldNode.getLength()));

http://git-wip-us.apache.org/repos/asf/arrow/blob/037d78dd/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
index b5a27b5..4ab624f 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java
@@ -115,6 +115,7 @@ public class ListVector extends BaseRepeatedValueVector implements FieldVector,
     // variable width values: truncate offset vector buffer to size (#1)
     org.apache.arrow.vector.BaseDataValueVector.truncateBufferBasedOnSize(ownBuffers, 1,
offsets.getBufferSizeFor(fieldNode.getLength() + 1));
     BaseDataValueVector.load(fieldNode, getFieldInnerVectors(), ownBuffers);
+    lastSet = fieldNode.getLength();
   }
 
   @Override


Mime
View raw message