Skip to content

Commit 0408c26

Browse files
committed
Address comments
1 parent c2d574f commit 0408c26

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

python/pyspark/sql/functions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3007,9 +3007,8 @@ def pandas_udf(f=None, returnType=None, functionType=None):
30073007
+---+----+------+
30083008
30093009
.. note:: For performance reasons, the input series to window functions are not copied.
3010-
Therefore, changing the value of the input series is not allowed and will
3011-
result incorrect results. For the same reason, users should also not rely
3012-
on the index of the input series.
3010+
Therefore, mutating the input series is not allowed and will cause incorrect results.
3011+
For the same reason, users should also not rely on the index of the input series.
30133012
30143013
.. seealso:: :meth:`pyspark.sql.GroupedData.agg` and :class:`pyspark.sql.Window`
30153014

python/pyspark/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def wrapped(*series):
147147

148148
def wrap_window_agg_pandas_udf(f, return_type, runner_conf, udf_index):
149149
window_bound_types_str = runner_conf.get('pandas_window_bound_types')
150-
window_bound_type = [t.strip() for t in window_bound_types_str.split(',')][udf_index]
150+
window_bound_type = [t.strip().lower() for t in window_bound_types_str.split(',')][udf_index]
151151
if window_bound_type == 'bounded':
152152
return wrap_bounded_window_agg_pandas_udf(f, return_type)
153153
elif window_bound_type == 'unbounded':

sql/core/src/main/scala/org/apache/spark/sql/execution/python/WindowInPandasExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import org.apache.spark.util.Utils
3737
/**
3838
* This class calculates and outputs windowed aggregates over the rows in a single partition.
3939
*
40-
* This is similar to [[WindowExec]]. The main difference is that this node doesn't not compute
40+
* This is similar to [[WindowExec]]. The main difference is that this node does not compute
4141
* any window aggregation values. Instead, it computes the lower and upper bound for each window
4242
* (i.e. window bounds) and pass the data and indices to Python worker to do the actual window
4343
* aggregation.

0 commit comments

Comments
 (0)