Github user feynmanliang commented on the pull request:
https://github.com/apache/spark/pull/7884#issuecomment-135137091
Since `instances : RDD[(Double, Vector)]` is effectively processed as
`RDD[(Double, 1.0, Vector)]` (due to default params / method aliases for
`add`), I wonder if we can just map `instances` into a `RDD[(Double, 1.0,
Vector)]` `if $(weightCol).isEmpty` and avoid using the `Either`s throughout
the code. This will add an additional pass, but I think it should be negligible
compared to the optimizer time.
---
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]