drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hnfgns <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-3313: Eliminate redundant #load methods ...
Date Fri, 31 Jul 2015 17:16:52 GMT
Github user hnfgns commented on a diff in the pull request:

    https://github.com/apache/drill/pull/81#discussion_r35994287
  
    --- Diff: exec/java-exec/src/main/codegen/templates/NullableValueVectors.java ---
    @@ -239,37 +183,30 @@ public void allocateNew(int valueCount) {
         accessor.reset();
       }
     
    -  /**
    -   * {@inheritDoc}
    -   */
    +  @Override
       public void zeroVector() {
    -    this.values.zeroVector();
    -    this.bits.zeroVector();
    +    bits.zeroVector();
    +    values.zeroVector();
       }
    +  </#if>
     
    -  @Override
    -  public int load(int valueCount, DrillBuf buf){
    -    clear();
    -    int loaded = bits.load(valueCount, buf);
    -
    -    // remove bits part of buffer.
    -    buf = buf.slice(loaded, buf.capacity() - loaded);
    -    loaded += values.load(valueCount, buf);
    -    return loaded;
    -  }
     
       @Override
       public void load(SerializedField metadata, DrillBuf buffer) {
    -    assert this.field.matches(metadata);
    -    int loaded = load(metadata.getValueCount(), buffer);
    -    assert metadata.getBufferLength() == loaded;
    -  }
    +    clear();
    +    final SerializedField bitsField = metadata.getChild(0);
    --- End diff --
    
    That would be a really nice addition to VV documentation. Thanks for pointing me this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message