Github user HyukjinKwon commented on the issue: https://github.com/apache/spark/pull/15209 I think we need a JIRA because `type` and `isinstance` are not exactly same. Also, maybe it'd better if the PR descriptions explains the bug and how this PR tries to resolve it. BTW, it seems you intend to support sub-classes via `isinstance` consistently across the API, right? If so, there are some instances similar with this. Maybe we should check those as well. ``` $ grep -r "type(.*) [=|\!]" . | grep .python | grep -v "tests.py" ./python/pyspark/ml/linalg/__init__.py: elif type(v) == np.ndarray: ./python/pyspark/ml/linalg/__init__.py: if type(other) == np.ndarray: ./python/pyspark/ml/linalg/__init__.py: if type(pairs) == dict: ./python/pyspark/ml/param/__init__.py: if type(value) == list: ./python/pyspark/ml/param/__init__.py: elif type(value) == np.unicode_: ./python/pyspark/ml/param/__init__.py: if type(value) == bool: ./python/pyspark/mllib/linalg/__init__.py: elif type(v) == np.ndarray: ./python/pyspark/mllib/linalg/__init__.py: if type(other) == np.ndarray: ./python/pyspark/mllib/linalg/__init__.py: if type(pairs) == dict: ./python/pyspark/mllib/stat/_statistics.py: if type(y) == str: ./python/pyspark/sql/column.py: if type(startPos) != type(length): ./python/pyspark/sql/readwriter.py: if type(path) != list: ./python/pyspark/sql/readwriter.py: if type(path) == list: ./python/pyspark/sql/streaming.py: if type(interval) != str or len(interval.strip()) == 0: ./python/pyspark/sql/streaming.py: if type(path) != str or len(path.strip()) == 0: ./python/pyspark/sql/streaming.py: if not outputMode or type(outputMode) != str or len(outputMode.strip()) == 0: ./python/pyspark/sql/streaming.py: if not queryName or type(queryName) != str or len(queryName.strip()) == 0: ./python/pyspark/sql/streaming.py: if type(processingTime) != str or len(processingTime.strip()) == 0: ./python/pyspark/sql/types.py: return type(self) == type(other) ```
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org