Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/1228#discussion_r184590500 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchSizer.java --- @@ -536,6 +556,11 @@ public ColumnSize getColumn(String name) { */ private int netRowWidth; private int netRowWidthCap50; + + /** + * actual row size if input is not empty. Otherwise, standard size. + */ + private int rowAllocSize; --- End diff -- @ppadma, not much more to add. If the code requires you do estimates based on no information, we won't get very good estimates. But, if we know we have 0 rows, then that itself is a good estimate of the size we'll need. If there is a way to improve the estimate, I'm guessing you'll find it as work proceeds and you seem more examples and test cases.
---