Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/1393#discussion_r14973020
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala ---
@@ -53,15 +53,15 @@ private[recommendation] case class
OutLinkBlock(elementIds: Array[Int], shouldSe
* we get product block b's message to update the corresponding users.
*/
private[recommendation] case class InLinkBlock(
- elementIds: Array[Int], ratingsForBlock: Array[Array[(Array[Int],
Array[Double])]])
+ elementIds: Array[Long], ratingsForBlock: Array[Array[(Array[Int],
Array[Double])]])
/**
* :: Experimental ::
- * A more compact class to represent a rating than Tuple3[Int, Int,
Double].
+ * A more compact class to represent a rating than Tuple3[Long, Long,
Double].
*/
@Experimental
-case class Rating(user: Int, product: Int, rating: Double)
+case class Rating(user: Long, product: Long, rating: Double)
--- End diff --
This is also a breaking change; we need to add another constructor that
takes Ints. You may be able to add one like this:
```
case class Rating(user: Long, product: Long, rating: Double) {
def this(u: Int, p: Int, r: Double) = this(u.toLong, p.toLong, r)
}
```
Or if it doesn't work, you need to turn this into a class instead of a case
class and add extends Serializable and the various constructors yourself.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---