Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/22858
Yup, I think strictly we should change. Looks there are two occurrences at
`udf` and `pands_udf` `isinstance(..., str)`.
Another problem at PySpark is, inconsistent type comparison like type(...)
== t` vs `isinstance(..., t)`. For instance, `type(...) == dict` vs
`isinstance(..., dict)` - the former does not allow `OrderedDict` but the later
allows.
Another problem is, some types like `bool` at Python inherits `int`. In
this case, `isinstance(...)` might produce unexpected results, for instance,
```python
>>> isinstance(True, int)
True
```
I was nervous about the cases above and didn't fix those changes so far.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]