in src/main/scala/com/spotify/bdrc/pipeline/MinItemPerUser.scala [81:91]
def sparkWithAlgebird(input: RDD[Rating]): RDD[Rating] = {
import com.twitter.algebird.Aggregator.minBy
import com.twitter.algebird.spark._
input
.keyBy(_.user)
.algebird
// Aggregate per key into a single `Rating` based on `Double` value via `_.score`. Explicit
// type due to type inference limitation.
.aggregateByKey(minBy { x: Rating => x.score })
.values
}