apache/spark — pull request #3675 by adrian-wang (2014-12-11 08:14:00+00:00)
Title: [SQL] sum and avg on empty table should always return null

So the optimizations are not valid. Also I think the optimization here is rarely encounter, so removing them will not have influence on performance.

I'll create JIRA after jira is back. Can we merge #3445 before I add a comparison test case from this?