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/08/09 11:53:48 UTC

[GitHub] [spark] dcoliversun commented on a diff in pull request #37450: [SPARK-40010][PYTHON][DOCS] Make pyspark.sql.window examples self-contained

dcoliversun commented on code in PR #37450:
URL: https://github.com/apache/spark/pull/37450#discussion_r941245048


##########
python/pyspark/sql/window.py:
##########
@@ -196,11 +208,23 @@ def rangeBetween(start: int, end: int) -> "WindowSpec":
         --------
         >>> from pyspark.sql import Window
         >>> from pyspark.sql import functions as func
-        >>> from pyspark.sql import SQLContext
-        >>> sc = SparkContext.getOrCreate()
-        >>> sqlContext = SQLContext(sc)
-        >>> tup = [(1, "a"), (1, "a"), (2, "a"), (1, "b"), (2, "b"), (3, "b")]
-        >>> df = sqlContext.createDataFrame(tup, ["id", "category"])
+        >>> df = spark.createDataFrame(

Review Comment:
   Yeah. without define `spark`, pyspark tests failed. Updated in https://github.com/apache/spark/pull/37450/commits/34623307de7809c76cbcfe864d2a3b4df98a61c5



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