arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject arrow git commit: ARROW-276: [JAVA] Nullable Vectors should extend BaseValueVector and not Bas…
Date Sat, 29 Jul 2017 00:11:05 GMT
Repository: arrow
Updated Branches:
  refs/heads/master 1dd0f5f58 -> 05af6400d


ARROW-276: [JAVA] Nullable Vectors should extend BaseValueVector and not Bas…

Fixing the inheritance tree:

Nullable <Fixed-length | Var-Length>Vectors do not use "ArrowBuf data" field in BaseDataValueVector.
Therefore, they should extend BaseValueVector class..

Author: siddharth <siddharth@dremio.com>

Closes #892 from siddharthteotia/ARROW-276 and squashes the following commits:

d919538 [siddharth] ARROW-276: Nullable Vectors should extend BaseValueVector and not BaseDataValueVector


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

Branch: refs/heads/master
Commit: 05af6400d7815e7733b866884feec102fa801838
Parents: 1dd0f5f
Author: siddharth <siddharth@dremio.com>
Authored: Fri Jul 28 17:10:58 2017 -0700
Committer: Steven Phillips <steven@dremio.com>
Committed: Fri Jul 28 17:10:58 2017 -0700

----------------------------------------------------------------------
 .../main/codegen/templates/NullableValueVectors.java    | 12 +++++++-----
 .../org/apache/arrow/vector/BaseDataValueVector.java    |  2 --
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/05af6400/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 5b99367..624ba9d 100644
--- a/java/vector/src/main/codegen/templates/NullableValueVectors.java
+++ b/java/vector/src/main/codegen/templates/NullableValueVectors.java
@@ -44,9 +44,10 @@ import org.apache.arrow.flatbuf.Precision;
  * NB: this class is automatically generated from ${.template_name} and ValueVectorTypes.tdd
using FreeMarker.
  */
 @SuppressWarnings("unused")
-public final class ${className} extends BaseDataValueVector implements <#if type.major
== "VarLen">VariableWidth<#else>FixedWidth</#if>Vector, NullableVector, FieldVector
{
+public final class ${className} extends BaseValueVector implements <#if type.major ==
"VarLen">VariableWidth<#else>FixedWidth</#if>Vector, NullableVector, FieldVector
{
   private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(${className}.class);
 
+protected final static byte[] emptyByteArray = new byte[]{};
   private final FieldReader reader = new ${minor.class}ReaderImpl(${className}.this);
 
   private final String bitsField = "$bits$";
@@ -217,7 +218,6 @@ public final class ${className} extends BaseDataValueVector implements
<#if type
         + bits.getBufferSizeFor(valueCount);
   }
 
-  @Override
   public ArrowBuf getBuffer() {
     return values.getBuffer();
   }
@@ -286,7 +286,6 @@ public final class ${className} extends BaseDataValueVector implements
<#if type
     bits.zeroVector();
     mutator.reset();
     accessor.reset();
-    super.reset();
   }
 
   @Override
@@ -314,12 +313,10 @@ public final class ${className} extends BaseDataValueVector implements
<#if type
     accessor.reset();
   }
 
-  @Override
   public void reset() {
     bits.zeroVector();
     mutator.reset();
     accessor.reset();
-    super.reset();
   }
 
   /**
@@ -333,6 +330,11 @@ public final class ${className} extends BaseDataValueVector implements
<#if type
   </#if>
 
   @Override
+  public TransferPair getTransferPair(String ref, BufferAllocator allocator, CallBack callBack)
{
+        return getTransferPair(ref, allocator);
+  }
+
+  @Override
   public TransferPair getTransferPair(BufferAllocator allocator){
     return new TransferImpl(name, allocator);
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/05af6400/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
----------------------------------------------------------------------
diff --git a/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java b/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
index 6d7d3f0..0fea719 100644
--- a/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
+++ b/java/vector/src/main/java/org/apache/arrow/vector/BaseDataValueVector.java
@@ -30,8 +30,6 @@ import org.apache.arrow.vector.util.TransferPair;
 
 public abstract class BaseDataValueVector extends BaseValueVector implements BufferBacked
{
 
-  protected final static byte[] emptyByteArray = new byte[]{}; // Nullable vectors use this
-
   public static void load(ArrowFieldNode fieldNode, List<BufferBacked> vectors, List<ArrowBuf>
buffers) {
     int expectedSize = vectors.size();
     if (buffers.size() != expectedSize) {


Mime
View raw message