Skip to content

Commit

Permalink
fix the bug in 'Last' component
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyunh committed Aug 29, 2014
1 parent b3df91b commit 7f6980a
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,7 @@ case class LastFunction(expr: Expression, base: AggregateExpression) extends Agg
var result: Any = null

override def update(input: Row): Unit = {
if (result == null) {
result = input
}
result = input
}

override def eval(input: Row): Any = if (result != null) expr.eval(result.asInstanceOf[Row]) else null
Expand Down

0 comments on commit 7f6980a

Please sign in to comment.