Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22063#discussion_r212346762
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/recommendation/ALS.scala 
---
    @@ -85,9 +85,8 @@ private[recommendation] trait ALSModelParams extends 
Params with HasPredictionCo
        * Attempts to safely cast a user/item id to an Int. Throws an exception 
if the value is
        * out of integer range or contains a fractional part.
        */
    -  protected[recommendation] val checkedCast = udf { (n: Any) =>
    +  protected[recommendation] val checkedCast = udf { n: AnyRef =>
    --- End diff --
    
    I'm fine with this workaround, but I think we should create an expression 
for this `checkedCast`. The current UDF doesn't work well with inputs of 
different types.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to