Github user gczsjdy commented on the issue:
https://github.com/apache/spark/pull/16476
@cloud-fan I have submitted a new version to support implicit cast.
We determine the implicit cast type in analysis stage, so maybe we won't do
`eval` then, so we can't be 100% intelligent, for example to cast parameters of
`("2", 2, "a", "2")` to `(2, 2, somewhat, 2)`.
I made a trade off here to follow the type of the first parameter(the
target) in general.
The specific type rules here:
1. If all the parameters are of the same type, we don't do implicit cast.
2. If the first parameter is of `NumericType`, we implicit cast all other
parameters to `NumericType` (only in this way, "2.0" and "2.00" can be treated
equal)and do the comparison, those that can't be cast to `NumericType` will be
set to null of `DoubleType`.
3. else, we implicit cast all other parameters to `StringType`, this can
always be successful.
---
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]