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


##########
python/pyspark/sql/functions.py:
##########
@@ -6158,12 +6764,14 @@ def _test() -> None:
     import doctest
     from pyspark.sql import Row, SparkSession
     import pyspark.sql.functions
+    import math
 
     globs = pyspark.sql.functions.__dict__.copy()
     spark = SparkSession.builder.master("local[4]").appName("sql.functions 
tests").getOrCreate()
     sc = spark.sparkContext
     globs["sc"] = sc
     globs["spark"] = spark
+    globs["math"] = math

Review Comment:
   Let's import this within the docstring. I think we should ideally remove all 
these globals (except `spark`).



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