Skip to content
Prev Previous commit
Next Next commit
Back out unrelated Exchange changes, which are slated for a separate …
…patch
  • Loading branch information
JoshRosen committed Jul 15, 2015
commit 9d9b092f01c573b73260c6acf69c3190d04f2c8c
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,16 @@ case class Exchange(
val rdd = if (needToCopyObjectsBeforeShuffle(part, serializer)) {
child.execute().mapPartitions { iter =>
val hashExpressions = newMutableProjection(expressions, child.output)()
iter.map(r => (hashExpressions(r).hashCode, r.copy()))
iter.map(r => (hashExpressions(r).copy, r.copy()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm since copy is a verb, it is better to keep the () i think. also we defined copy with ()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to make this change in this PR, will back out this one line.

}
} else {
child.execute().mapPartitions { iter =>
val hashExpressions = newMutableProjection(expressions, child.output)()
val mutablePair = new MutablePair[Int, InternalRow]()
iter.map(r => mutablePair.update(hashExpressions(r).hashCode, r))
val mutablePair = new MutablePair[InternalRow, InternalRow]()
iter.map(r => mutablePair.update(hashExpressions(r), r))
}
}
val shuffled = new ShuffledRDD[Int, InternalRow, InternalRow](rdd, part)
val shuffled = new ShuffledRDD[InternalRow, InternalRow, InternalRow](rdd, part)
shuffled.setSerializer(serializer)
shuffled.map(_._2)

Expand Down