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:

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

Inheritance is defined as:

{code}
class NullableVarCharVector extends BaseDataValueVector ...
{code}

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

{code}
  protected DrillBuf data;
{code}

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

Improvements:

* 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
class.
* Adjust member functions to match.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message