Github user jaltekruse commented on a diff in the pull request:

    https://github.com/apache/drill/pull/81#discussion_r35809948
  
    --- Diff: exec/java-exec/src/main/codegen/templates/FixedValueVectors.java 
---
    @@ -156,21 +156,17 @@ public void zeroVector() {
       }
     
       @Override
    -  public int load(int valueCount, DrillBuf buf){
    +  public void load(SerializedField metadata, DrillBuf buffer) {
    +    final int actualLength = metadata.getBufferLength();
    +    final int valueCount = metadata.getValueCount();
    +    final int expectedLength = valueCount * ${type.width};
    +    assert actualLength == expectedLength : String.format("Expected to 
load %d bytes but actually loaded %d bytes", expectedLength, actualLength);
    +
         clear();
    -    int len = valueCount * ${type.width};
    -    data = buf.slice(0, len);
    +    data = buffer.slice(0, actualLength);
    +    data.writerIndex(actualLength);
         data.retain();
    -    data.writerIndex(len);
    -    return len;
    -  }
    -
    -  @Override
    -  public void load(SerializedField metadata, DrillBuf buffer) {
    -    assert this.field.matches(metadata) : String.format("The field %s 
doesn't match the provided metadata %s.", this.field, metadata);
    --- End diff --
    
    Are you sure we want to actually remove this assert, are we certain that it 
is no longer useful for catching inconsistent state problems?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to