Skip to content

Commit

Permalink
Add explicit Ordering for (ReferenceRegion, Int) in shuffle join
Browse files Browse the repository at this point in the history
  • Loading branch information
laserson authored and fnothaft committed Jan 22, 2015
1 parent d0821c7 commit eeb251c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ import scala.reflect.ClassTag

object ShuffleRegionJoin {

implicit val manualRegionOrdering = new Ordering[(ReferenceRegion, Int)] {
override def compare(x: (ReferenceRegion, Int), y: (ReferenceRegion, Int)) = {
if (x._1 != y._1) {
x._1.compare(y._1)
} else {
x._2.compare(y._2)
}
}
}

/**
* Performs a region join between two RDDs (shuffle join).
*
Expand Down

0 comments on commit eeb251c

Please sign in to comment.