aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test/scala/org
diff options
context:
space:
mode:
Diffstat (limited to 'sql/hive/src/test/scala/org')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala
index d27287bad0..aaf1db65a6 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala
@@ -46,14 +46,16 @@ case class TestingTypedCount(
override def createAggregationBuffer(): State = TestingTypedCount.State(0L)
- override def update(buffer: State, input: InternalRow): Unit = {
+ override def update(buffer: State, input: InternalRow): State = {
if (child.eval(input) != null) {
buffer.count += 1
}
+ buffer
}
- override def merge(buffer: State, input: State): Unit = {
+ override def merge(buffer: State, input: State): State = {
buffer.count += input.count
+ buffer
}
override def eval(buffer: State): Any = buffer.count