zero323 commented on a change in pull request #34671:
URL: https://github.com/apache/spark/pull/34671#discussion_r754564756



##########
File path: python/pyspark/mllib/_typing.pyi
##########
@@ -16,8 +16,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-from typing import List, Tuple, Union
+from typing import List, Tuple, TypeVar, Union
 from pyspark.mllib.linalg import Vector
 from numpy import ndarray  # noqa: F401
+from py4j.java_gateway import JavaObject
 
 VectorLike = Union[ndarray, Vector, List[float], Tuple[float, ...]]
+C = TypeVar("C", bound=type)
+JavaObjectType = Union[JavaObject, bytearray, bytes]

Review comment:
       On a second thought, let's just use something more descriptive ‒ 
`JavaObjectOrPickleDump` or something around these lines.




-- 
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]

Reply via email to