Github user Ben-Zvi commented on a diff in the pull request:
https://github.com/apache/drill/pull/1101#discussion_r164604859
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/aggregate/HashAggTemplate.java
---
@@ -397,11 +384,9 @@ private void delayedSetup() {
}
numPartitions = BaseAllocator.nextPowerOfTwo(numPartitions); // in
case not a power of 2
- if ( schema == null ) { estValuesBatchSize = estOutgoingAllocSize =
estMaxBatchSize = 0; } // incoming was an empty batch
--- End diff --
Why was the ( schema == null ) check removed ? Without it, calling
updateEstMaxBatchSize() would return an NPE when accessing the batch's schema
(when calling RecordBatchSizer(incoming) ).
---