You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "James Turton (Jira)" <ji...@apache.org> on 2023/02/15 06:34:00 UTC

[jira] [Updated] (DRILL-5531) Nullable value vectors unnecessarily inherit from BaseDataValueVector

     [ https://issues.apache.org/jira/browse/DRILL-5531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Turton updated DRILL-5531:
--------------------------------
    Fix Version/s:     (was: 1.21.0)

> 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
(v8.20.10#820010)