@@ -27,7 +27,7 @@ abstract class AggregateExpression extends Expression {
2727 * Creates a new instance that can be used to compute this aggregate expression for a group
2828 * of input rows/
2929 */
30- def newInstance : AggregateFunction
30+ def newInstance () : AggregateFunction
3131}
3232
3333/**
@@ -75,7 +75,7 @@ abstract class AggregateFunction
7575 override def eval (input : Row ): Any
7676
7777 // Do we really need this?
78- override def newInstance = makeCopy(productIterator.map { case a : AnyRef => a }.toArray)
78+ override def newInstance () = makeCopy(productIterator.map { case a : AnyRef => a }.toArray)
7979}
8080
8181case class Count (child : Expression ) extends PartialAggregate with trees.UnaryNode [Expression ] {
@@ -89,7 +89,7 @@ case class Count(child: Expression) extends PartialAggregate with trees.UnaryNod
8989 SplitEvaluation (Sum (partialCount.toAttribute), partialCount :: Nil )
9090 }
9191
92- override def newInstance = new CountFunction (child, this )
92+ override def newInstance () = new CountFunction (child, this )
9393}
9494
9595case class CountDistinct (expressions : Seq [Expression ]) extends AggregateExpression {
@@ -98,7 +98,7 @@ case class CountDistinct(expressions: Seq[Expression]) extends AggregateExpressi
9898 override def nullable = false
9999 override def dataType = IntegerType
100100 override def toString = s " COUNT(DISTINCT ${expressions.mkString(" ," )}}) "
101- override def newInstance = new CountDistinctFunction (expressions, this )
101+ override def newInstance () = new CountDistinctFunction (expressions, this )
102102}
103103
104104case class Average (child : Expression ) extends PartialAggregate with trees.UnaryNode [Expression ] {
@@ -118,7 +118,7 @@ case class Average(child: Expression) extends PartialAggregate with trees.UnaryN
118118 partialCount :: partialSum :: Nil )
119119 }
120120
121- override def newInstance = new AverageFunction (child, this )
121+ override def newInstance () = new AverageFunction (child, this )
122122}
123123
124124case class Sum (child : Expression ) extends PartialAggregate with trees.UnaryNode [Expression ] {
@@ -134,7 +134,7 @@ case class Sum(child: Expression) extends PartialAggregate with trees.UnaryNode[
134134 partialSum :: Nil )
135135 }
136136
137- override def newInstance = new SumFunction (child, this )
137+ override def newInstance () = new SumFunction (child, this )
138138}
139139
140140case class SumDistinct (child : Expression )
@@ -145,7 +145,7 @@ case class SumDistinct(child: Expression)
145145 override def dataType = child.dataType
146146 override def toString = s " SUM(DISTINCT $child) "
147147
148- override def newInstance = new SumDistinctFunction (child, this )
148+ override def newInstance () = new SumDistinctFunction (child, this )
149149}
150150
151151case class First (child : Expression ) extends PartialAggregate with trees.UnaryNode [Expression ] {
@@ -160,7 +160,7 @@ case class First(child: Expression) extends PartialAggregate with trees.UnaryNod
160160 First (partialFirst.toAttribute),
161161 partialFirst :: Nil )
162162 }
163- override def newInstance = new FirstFunction (child, this )
163+ override def newInstance () = new FirstFunction (child, this )
164164}
165165
166166case class AverageFunction (expr : Expression , base : AggregateExpression )
0 commit comments