apache/spark — pull request #977 by egraldlo (2014-06-05 07:16:01+00:00)
Title: do best to avoid overflow in avg function

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.