HyukjinKwon commented on code in PR #39041:
URL: https://github.com/apache/spark/pull/39041#discussion_r1051834536


##########
python/pyspark/sql/functions.py:
##########
@@ -2341,6 +2415,7 @@ def approx_count_distinct(col: "ColumnOrName", rsd: 
Optional[float] = None) -> C
         return _invoke_function("approx_count_distinct", _to_java_column(col), 
rsd)
 
 
+@try_remote_functions
 def broadcast(df: DataFrame) -> DataFrame:

Review Comment:
   Here too. The whole logic would look like:
   
   ```python
   def broadcast(df: PySparkDataFrame) -> PySparkDataFrame:
       if is_remote():
           return typing.cast(PySparkDataFrame, connect.broadcast(df))
       else:
           return typing.cast(PySparkDataFrame, pyspark.boradcast(df))
   ```
   
   And, we will just use the existing type annotations so users codes won't 
need to change their type annotations.



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