nchammas commented on a change in pull request #34671:
URL: https://github.com/apache/spark/pull/34671#discussion_r753557511
##########
File path: python/pyspark/ml/common.py
##########
@@ -111,13 +114,16 @@ def _java2py(sc, r, encoding="bytes"):
return r
-def callJavaFunc(sc, func, *args):
+def callJavaFunc(sc: pyspark.context.SparkContext, func, *args):
"""Call Java Function"""
- args = [_py2java(sc, a) for a in args]
- return _java2py(sc, func(*args))
+ java_args = [_py2java(sc, a) for a in args]
+ return _java2py(sc, func(*java_args))
+
+
+C = TypeVar("C", bound=type)
Review comment:
I'm not really sure that this is appropriate, since `C` now becomes part
of the public interface for common.py:
```python
>>> from pyspark.ml.common import C
>>> C
~C
```
@zero323?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]