Skip to content

Commit

Permalink
Address last review
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-Lo committed Sep 1, 2023
1 parent eb6435c commit 0a637eb
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,12 @@ public long calculateSizeOfColHelper(ColumnVector col) {
for (int j = 0; j < unionColumnVector.fields.length; j++) {
converterBufferColSize += calculateSizeOfColHelper(unionColumnVector.fields[j]);
}
} else if (col instanceof LongColumnVector) {
} else if (col instanceof LongColumnVector || col instanceof DoubleColumnVector || col instanceof DecimalColumnVector) {
// Memory space in bytes of native type
converterBufferColSize += col.isNull.length * 8;
} else if (col instanceof DoubleColumnVector) {
converterBufferColSize += col.isNull.length * 8;
} else if (col instanceof BytesColumnVector) {
// Contains two integer list references of size vector for tracking so will use that as null size
converterBufferColSize += ((BytesColumnVector) col).vector.length * 8;
} else if (col instanceof DecimalColumnVector) {
// Null values are represented as longs
converterBufferColSize += col.isNull.length * 8;
}
// Calculate overhead of the column's own null reference
converterBufferColSize += col.isNull.length;
Expand Down

0 comments on commit 0a637eb

Please sign in to comment.