Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tiny touchup. Make Aggregate Processor a bit more DRYly
  • Loading branch information
hvanhovell committed Aug 10, 2015
commit be5199cd76adfd86269259201a587c9e69048b1a
Original file line number Diff line number Diff line change
Expand Up @@ -885,21 +885,9 @@ private[execution] final class AggregateProcessor(

/** Bulk update the given buffer. */
def update(buffer: MutableRow, input: CompactBuffer[InternalRow], begin: Int, end: Int): Unit = {
updateProjection.target(buffer)
var i = begin
while (i < end) {
val row = input(i)
updateProjection(join(buffer, row))
var j = 0
while (j < aggregates2Size) {
aggregates2(j).update(buffer, row)
j += 1
}
j = 0
while (j < aggregates1Size) {
buffer.getAs[AggregateFunction1](aggregates1BufferOffsets(j), null).update(row)
j += 1
}
update(buffer, input(i))
i += 1
}
}
Expand Down