@@ -302,14 +302,15 @@ abstract class StddevAgg(child: Expression) extends AlgebraicAggregate {
302302 private val currentAvg = AttributeReference (" currentAvg" , resultType)()
303303 private val currentMk = AttributeReference (" currentMk" , resultType)()
304304
305- override val bufferAttributes = preCount :: currentCount :: preAvg :: currentAvg :: currentMk :: Nil
305+ override val bufferAttributes = preCount :: currentCount :: preAvg ::
306+ currentAvg :: currentMk :: Nil
306307
307308 override val initialValues = Seq (
308- /* preCount = */ Cast (Literal (0 ), resultType),
309+ /* preCount = */ Cast (Literal (0 ), resultType),
309310 /* currentCount = */ Cast (Literal (0 ), resultType),
310- /* preAvg = */ Cast (Literal (0 ), resultType),
311- /* currentAvg = */ Cast (Literal (0 ), resultType),
312- /* currentMk = */ Cast (Literal (0 ), resultType)
311+ /* preAvg = */ Cast (Literal (0 ), resultType),
312+ /* currentAvg = */ Cast (Literal (0 ), resultType),
313+ /* currentMk = */ Cast (Literal (0 ), resultType)
313314 )
314315
315316 override val updateExpressions = {
@@ -330,16 +331,17 @@ abstract class StddevAgg(child: Expression) extends AlgebraicAggregate {
330331
331332 Seq (
332333 /* preCount = */ If (IsNull (child), preCount, currentCount),
333- /* currentCount = */ If (IsNull (child), currentCount, Add (currentCount, Cast (Literal (1 ), resultType))),
334+ /* currentCount = */ If (IsNull (child), currentCount,
335+ Add (currentCount, Cast (Literal (1 ), resultType))),
334336 /* preAvg = */ If (IsNull (child), preAvg, currentAvg),
335337 /* currentAvg = */ If (IsNull (child), currentAvg, avgAdd),
336338 /* currentMk = */ If (IsNull (child), currentMk, mkAdd)
337339 )
338340 }
339341
340342 override val mergeExpressions = {
341-
342- // count merge
343+
344+ // count merge
343345 def countMerge : Expression = {
344346 currentCount.left + currentCount.right
345347 }
0 commit comments