drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Rogers (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5531) Nullable value vectors unnecessarily inherit from BaseDataValueVector
Date Sun, 21 May 2017 23:22:04 GMT
Paul Rogers created DRILL-5531:

             Summary: Nullable value vectors unnecessarily inherit from BaseDataValueVector

                 Key: DRILL-5531
                 URL: https://issues.apache.org/jira/browse/DRILL-5531
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.8.0
            Reporter: Paul Rogers
            Priority: Minor

Consider a typical nullable value vector: NullableVarCharVector. The members are:

  private final UInt1Vector bits = new UInt1Vector(bitsField, allocator);
  private final VarCharVector values = new VarCharVector(field, allocator);

Inheritance is defined as:

class NullableVarCharVector extends BaseDataValueVector ...

But, notice the members of {{BaseDataValueVector}}:

  protected DrillBuf data;

It is confusing that a nullable vector has a data buffer that is never used. Instead, the
data is carried by the {{values}} member.


* Define a new {{BaseNullableVector}} class that does not extend {{BaseDataValueVector}}.
* Move the {{bits}} member to the new base class rather than declaring it anew in each generated
* Adjust member functions to match.

This message was sent by Atlassian JIRA

View raw message