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

    https://github.com/apache/drill/pull/1107#discussion_r167146010
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/spill/RecordBatchSizer.java
 ---
    @@ -137,10 +137,10 @@ public ColumnSize(ValueVector v, String prefix) {
           case MAP:
           case UNION:
             // No standard size for Union type
    -        dataSize = v.getPayloadByteCount(valueCount);
    +        dataSize = valueCount == 0 ? 0 : v.getPayloadByteCount(valueCount);
    --- End diff --
    
    Can the 0-handling be pushed into the `getPayloadByteCount` method? Seems 
error-prone and messy to sprinkle the 0-checks everywhere.


---

Reply via email to