Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reword
  • Loading branch information
icexelloss committed Apr 4, 2018
commit f96eaeaaa420cebfe8d3b7232edc62f4f3c12a74
6 changes: 3 additions & 3 deletions python/pyspark/sql/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class Window(object):
>>> # PARTITION BY country ORDER BY date RANGE BETWEEN 3 PRECEDING AND 3 FOLLOWING
>>> window = Window.orderBy("date").partitionBy("country").rangeBetween(-3, 3)

.. note:: The default frame boundaries for window are (rowFrame, unboundedPreceding,
unboundedFollowing). When a ordering is defined, the default frame boundaries
for window are (rangeFrame, unboundedPreceding, currentRow).
.. note:: When ordering is not defined, the default frame boundaries are (rowFrame,
unboundedPreceding, unboundedFollowing). When ordering is defined, the default frame
boundaries are (rangeFrame, unboundedPreceding, currentRow).

.. note:: Experimental

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import org.apache.spark.sql.catalyst.expressions._
* Window.partitionBy("country").orderBy("date").rowsBetween(-3, 3)
* }}}
*
* @note The default frame boundaries for window are (rowFrame, unboundedPreceding,
* unboundedFollowing). When a ordering is defined, the default frame boundaries
* for window are (rangeFrame, unboundedPreceding, currentRow).
* @note When ordering is not defined, the default frame boundaries are (rowFrame,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to improve the wording (feel free not to use this):

When ordering is not defined, an unbounded window frame (rowFrame, unboundedPreceding, unboundedFollowing) is used by default. When ordering is defined, a growing window frame (rangeFrame, unboundedPreceding, currentRow) is used by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your wording is better. Updated.

* unboundedPreceding, unboundedFollowing). When ordering is defined, the default frame
* boundaries are (rangeFrame, unboundedPreceding, currentRow).
*
* @since 1.4.0
*/
Expand Down