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

    https://github.com/apache/drill/pull/1175#discussion_r175629518
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchSizer.java 
---
    @@ -321,10 +321,8 @@ public ColumnSize(ValueVector v, String prefix) {
     
               // Calculate pure data size.
               if (isVariableWidth) {
    -            UInt4Vector offsetVector = ((RepeatedValueVector) 
v).getOffsetVector();
    -            int innerValueCount = 
offsetVector.getAccessor().get(valueCount);
                 VariableWidthVector dataVector = ((VariableWidthVector) 
((RepeatedValueVector) v).getDataVector());
    -            totalDataSize = 
dataVector.getOffsetVector().getAccessor().get(innerValueCount);
    +            totalDataSize = dataVector.getCurrentSizeInBytes();
    --- End diff --
    
    @paul-rogers - I don't think `totalDataSize` includes both offset vector 
side and bytes size. It was meant to only include **pure data size only** for 
all entries in that column and that's what comment also suggests.
    
    Instead `totalNetSize` includes the size for data and offset vector which 
is used for computing the rowWidth.


---

Reply via email to