Github user MLnick commented on the issue:
https://github.com/apache/spark/pull/17059
The discussion around numeric types was at
https://github.com/apache/spark/pull/12762#r61539327. The checked cast was
introduced because it was previously implicitly cast to `Int` anyway, and would
mangle `Long` ids without any warning. I did think about only supporting `Int`
& `Long` there - but we decided to just support any numeric type within range.
I guess it was around the time that we were porting most pipeline components to
support all numeric input types.
In hindsight I would have just gone for restricting it to `Int` & `Long`.
In reality in the case of ALS users really should not be using `Double` for
ids (e.g. an id of `123.4` is clearly wrong, `123.0` could occur I guess more
by accident or poor schema, but in that case we support it here). So I think
the likelihood of any real impact from being restrictive in terms of
fractionals is really low.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]