From 0a637eb7a0d0e859ce3f4aa00cd304205930fc86 Mon Sep 17 00:00:00 2001 From: William Lo Date: Fri, 1 Sep 2023 15:48:07 -0400 Subject: [PATCH] Address last review --- .../apache/gobblin/writer/OrcConverterMemoryManager.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gobblin-modules/gobblin-orc/src/main/java/org/apache/gobblin/writer/OrcConverterMemoryManager.java b/gobblin-modules/gobblin-orc/src/main/java/org/apache/gobblin/writer/OrcConverterMemoryManager.java index 73be1ce4f5f..dcd6250dcde 100644 --- a/gobblin-modules/gobblin-orc/src/main/java/org/apache/gobblin/writer/OrcConverterMemoryManager.java +++ b/gobblin-modules/gobblin-orc/src/main/java/org/apache/gobblin/writer/OrcConverterMemoryManager.java @@ -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;