You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/01/10 20:44:15 UTC
[GitHub] [spark] zero323 commented on a change in pull request #34439: [SPARK-37095][PYTHON] Inline type hints for files in python/pyspark/broadcast.py
zero323 commented on a change in pull request #34439:
URL: https://github.com/apache/spark/pull/34439#discussion_r781534293
##########
File path: python/pyspark/broadcast.py
##########
@@ -53,18 +51,18 @@
# Holds broadcasted data received from Java, keyed by its id.
-_broadcastRegistry: Dict[int, "Broadcast[Any]"] = {}
+_broadcastRegistry: Dict[int, "Broadcast"] = {}
-def _from_id(bid: int) -> "Broadcast[Any]":
+def _from_id(bid: int) -> "Broadcast":
from pyspark.broadcast import _broadcastRegistry
if bid not in _broadcastRegistry:
raise RuntimeError("Broadcast variable '%s' not loaded!" % bid)
return _broadcastRegistry[bid]
-class Broadcast(Generic[T]):
Review comment:
Oh, wecannot do that. `Generic[T]` has to go back.
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org