Github user ppadma commented on a diff in the pull request: https://github.com/apache/drill/pull/1101#discussion_r166136279 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java --- @@ -226,7 +221,7 @@ public BatchHolder() { ((FixedWidthVector) vector).allocateNew(HashTable.BATCH_SIZE); } else if (vector instanceof VariableWidthVector) { // This case is never used .... a varchar falls under ObjectVector which is allocated on the heap ! - ((VariableWidthVector) vector).allocateNew(maxColumnWidth, HashTable.BATCH_SIZE); + ((VariableWidthVector) vector).allocateNew(columnSize, HashTable.BATCH_SIZE); --- End diff -- for a just allocated vector, estSize will return 0. how can we use that for allocation ?
---