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



##########
File path: python/pyspark/broadcast.py
##########
@@ -175,27 +203,27 @@ def destroy(self, blocking=False):
         self._jbroadcast.destroy(blocking)
         os.unlink(self._path)
 
-    def __reduce__(self):
+    def __reduce__(self) -> Tuple[Callable[[int], T], Tuple[int]]:

Review comment:
       This signature seems to be wrong. Double checking the flow:
   
   -  `_from_id` returns `_broadcastRegistry[bid]`
   - `_broadcastRegistry` is  `_broadcastRegistry: Dict[int, "Broadcast[Any]"]`
   -  So `_from_id` is either `Callable[[int],  Broadcast[T]]`, or if it 
doesn't type check, `Callable[[int], Broadcast[Any]]`




-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to