arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [11/12] arrow git commit: ARROW-1112: [JAVA] Set lastSet for VarLength and List vectors when loading
Date Sun, 11 Jun 2017 15:13:59 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/ac648539
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/ac648539
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/ac648539

Branch: refs/heads/master
Commit: ac6485390b04786959a42d55cd28d64bfbb40589
Parents: 11deee6
Author: Steven Phillips <steven@dremio.com>
Authored: Tue Jun 6 15:19:42 2017 -0700
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sun Jun 11 11:13:25 2017 -0400

----------------------------------------------------------------------
 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/ac648539/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/ac648539/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