HyukjinKwon commented on a change in pull request #25939:
[SPARK-27463][PYTHON][FOLLOW-UP] Miscellaneous documentation and code cleanup
of cogroup pandas UDF
URL: https://github.com/apache/spark/pull/25939#discussion_r328877434
##########
File path: python/pyspark/sql/cogroup.py
##########
@@ -96,3 +119,27 @@ def apply(self, udf):
def _extract_cols(gd):
df = gd._df
return [df[col] for col in df.columns]
+
+
+def _test():
+ import doctest
+ from pyspark.sql import SparkSession
+ import pyspark.sql.cogroup
+ globs = pyspark.sql.cogroup.__dict__.copy()
+ spark = SparkSession.builder\
+ .master("local[4]")\
+ .appName("sql.cogroup tests")\
+ .getOrCreate()
+ sc = spark.sparkContext
+ globs['sc'] = sc
Review comment:
(and this line too)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]