From ec6357548f366e6d85535fc165718f9af43e52f7 Mon Sep 17 00:00:00 2001 From: Michael Armbrust Date: Thu, 3 Apr 2014 17:31:34 -0700 Subject: [PATCH] Add comment. --- .../main/scala/org/apache/spark/sql/execution/aggregates.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregates.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregates.scala index 70fb9b08d62bc..2a4f7b5670457 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregates.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/aggregates.scala @@ -188,6 +188,8 @@ case class Aggregate( var i = 0 while (i < currentBuffer.length) { + // Evaluating an aggregate buffer returns the result. No row is required since we + // already added all rows in the group using update. aggregateResults(i) = currentBuffer(i).apply(EmptyRow) i += 1 }