def scalding()

in src/main/scala/com/spotify/bdrc/pipeline/MaxItemPerUser.scala [30:36]


  def scalding(input: TypedPipe[Rating]): TypedPipe[Rating] = {
    input
      .groupBy(_.user)
      // Reduce items per key by picking the side with higher score for each pair of input
      .reduce((x, y) => if (x.score > y.score) x else y)
      .values
  }