HyukjinKwon commented on code in PR #40388: URL: https://github.com/apache/spark/pull/40388#discussion_r1135137634
########## python/pyspark/sql/connect/functions.py: ########## @@ -2466,10 +2471,6 @@ def udf( udf.__doc__ = pysparkfuncs.udf.__doc__ -def pandas_udf(*args: Any, **kwargs: Any) -> None: Review Comment: and to address Takuya's comment, I guess it'd pretty easy from a cursory look. We can just throw an exception here: ``` def pandas_udf(f=None, returnType=None, functionType=None): from pyspark.sql.functions import pandas_udf if is_remote() and "PYSPARK_NO_NAMESPACE_SHARE" not in os.environ: return pandas_udf(f, returnType, functionType) else: # Should not reach here in production because `PYSPARK_NO_NAMESPACE_SHARE` is # for test only, and users should have invoked regular `pyspark.sql.functions.pandas_udf` # if Spark Connect is enabled. raise RuntimeError("blah blah") ``` -- 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