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

    https://github.com/apache/drill/pull/767#discussion_r104275436
  
    --- Diff: exec/vector/src/main/codegen/templates/VariableLengthVectors.java 
---
    @@ -253,7 +253,7 @@ public int getPayloadByteCount() {
           // If 1 or more values, then the last value is set to
           // the offset of the next value, which is the same as
           // the length of existing values.
    -      return a.get(count-1);
    +      return a.get(count-1) + offsetVector.getPayloadByteCount();
    --- End diff --
    
    Added a comment. Basically, for planning purposes, the "payload" bytes for 
a Varchar vector include the bytes taken to hold the text data PLUS the bytes 
needed by the offset vector that points to those bytes. When averaged, it means 
a Varchar column width is 4 + avg. byte width.


---
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