Github user MLnick commented on the pull request:
https://github.com/apache/spark/pull/11218#issuecomment-190105180
Thanks @grzegorz-chilkiewicz. I see `ElementwiseProduct` also needs
`validateInputType`.
I'm wondering if it makes sense to do the default validation in the
abstract class?
Something like the following in `UnaryTransformer`:
```scala
/**
* Validates the input type. Throw an exception if it is invalid.
*/
protected def validateInputType(inputType: DataType): Unit = {
val inType = classOf[IN].getSimpleName
require(inputType.isInstanceOf[IN], s"Input type must be $inType but
got $inputType.")
}
```
@jkbradley @mengxr what do you think about this?
---
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]