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
fix bug of with BufferAndKeys
  • Loading branch information
chenghao-intel committed Jun 8, 2015
commit 5b015184fef3ef3a414f84238dfd04ccb1246ab2
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ sealed class BufferAndKey(leftLen: Int, rightLen: Int)
// copy the keys to the last
var idx = leftLen
var idx2 = 0
while (idx < keys.length) {
while (idx2 < keys.length) {
this.values(idx) = keys(idx2)
idx2 += 1
idx += 1
Expand Down Expand Up @@ -210,7 +210,7 @@ case class AggregatePreShuffle(
val keys = groupByProjection(currentRow)
results(keys) match {
case null =>
val buffer = new BufferAndKey(output.length, keys)
val buffer = new BufferAndKey(buffersSchema.length, keys)
// update the aggregate buffers
var idx = 0
while (idx < aggregates.length) {
Expand Down Expand Up @@ -426,7 +426,7 @@ case class DistinctAggregate(
val keys = groupByProjection(currentRow)
results(keys) match {
case null =>
val buffer = new BufferAndKey(aggregates.length, keys)
val buffer = new BufferAndKey(buffersSchema.length, keys)
val seens = new Array[JSet[Any]](aggregates.length)

// update the aggregate buffers
Expand Down