apache/spark — pull request #978 by egraldlo (2014-06-05 08:48:23+00:00)
Title: do best to avoid overflowing in function avg

since we define the return data type of avg() to DoubleType, I think we can do our best to extend the scope to avoid the overflowing, so I think we can transform the datatype to DoubleType before sum.