Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/761#discussion_r103335368
  
    --- Diff: exec/vector/src/main/codegen/templates/VariableLengthVectors.java 
---
    @@ -238,6 +238,25 @@ public boolean copyFromSafe(int fromIndex, int 
thisIndex, ${minor.class}Vector f
         return true;
       }
     
    +  @Override
    +  public int getAllocatedByteCount() {
    +    return offsetVector.getAllocatedByteCount() + 
super.getAllocatedByteCount();
    --- End diff --
    
    `super` is called only if the super class holds an actual buffer or nested 
vector: not all do.
    
    A sanity test is done in the sort: we compare the calculated memory 
allocation with the actual memory delta when "taking ownership" of a batch. We 
get an error if the numbers differ. That check ensures that the calcs in each 
vector type are correct.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to