Github user Ben-Zvi commented on a diff in the pull request: https://github.com/apache/drill/pull/938#discussion_r139045744 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java --- @@ -1335,7 +1470,7 @@ private void updateStats(HashTable[] htables) { } if ( rowsReturnedEarly > 0 ) { stats.setLongStat(Metric.SPILL_MB, // update stats - est. total MB returned early - (int) Math.round( rowsReturnedEarly * estRowWidth / 1024.0D / 1024.0)); + (int) Math.round( rowsReturnedEarly * estOutputRowWidth / 1024.0D / 1024.0)); --- End diff -- Work will be done later as part of DRILL-5779
---